错误error C2665: 'operator new' : none of the 5 overloads could convert all the argument types
戈博易
2023-12-01
error C2665: 'operator new' : none of the 5 overloads could convert all the argument types
据说是因为STL与DEBUG NEW运算符的冲突(影响list、vector等)
解决方法1:注释掉以下代码:
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
解决方法2:
将:代码中的#include <vector>移到stdafx.h的开头,也就是#program once的后面。
两种方法都可以。