錯誤error C2665: 'operator new' : none of the 5 overloads could convert all the argument types


 1591人閱讀 評論(3) 收藏 舉報
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的後面。

兩種方法都可以。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章