error C2833 MFC添加任意自定义函数报错 解决方法

--------------------Configuration: maizang - Win32 Debug--------------------
Compiling...
maizangDlg.cpp
c:\program files\microsoft visual studio\vc98\include\crtdbg.h(536) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\include\crtdbg.h(536) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(674) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(674) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(674) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(675) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(675) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(675) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(683) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(683) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(683) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(1631) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(1631) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(122) : error C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(123) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(123) : error C2802: static member 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(123) : error C2333: 'new' : error in function declaration; skipping function body
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : error C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : error C2802: static member 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(135) : error C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(135) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(135) : error C2556: 'void *(__cdecl *__stdcall CNoTrackObject::operator new(void))(unsigned int,const char *,int)' : overloaded function differs only by return type from 'void *(__c
decl *__stdcall CNoTrackObject::operator new(void))(unsigned int)'
        c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : see declaration of 'new'
执行 cl.exe 时出错.

maizang.exe - 1 error(s), 0 warning(s)

 

 

错误如上   解决方法

把Debug目录下的 .pch文件删除

你可能感兴趣的:(error C2833 MFC添加任意自定义函数报错 解决方法)