阅读:1136回复:0
new在类里面重载后声明的问题
Class A
{ public: ... void* operator new(size_t n) {return ExAllocatePool(NonPagedPool,n);} void operator delete(void* p) {ExFreePool(p);} } 另一个cpp里面调用: void B() { A a = new A; } 出现错误:error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function "void __stdcall B(void)" (?B@@YGXXZ) 请教各位大虾 |
|