首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

MFC中各头文件的这段代码是什么意思解决方案

2014-05-30 
MFC中各头文件的这段代码是什么意思#ifdef_DEBUG#definenewDEBUG_NEW#undefTHIS_FILEstaticcharTHIS_FILE[

MFC中各头文件的这段代码是什么意思
#ifdef   _DEBUG
#define   new   DEBUG_NEW
#undef   THIS_FILE
static   char   THIS_FILE[]   =   __FILE__;
#endif

[解决办法]
#ifdef _DEBUG //如果是DEBUG版本
#define new DEBUG_NEW //用debug new 来代替new
#undef THIS_FILE
static char THIS_FILE[] = __FILE__; //这个宏是用来取当前文件名的
#endif

热点排行