2014年3月22日16:00:52
调试代码的宏定义
1、使用VS2008创建一个带预编译头的控制台项目。
2、在stdafx.h文件结尾添加:
#include "stdafx.h"
#include<iostream>
using namespace std;
//#define LWW_DEBUG
#ifdef LWW_DEBUG
#define DbgPrintf printf
#else
#define DbgPrintf //
#endif
int main( void )
{
DbgPrintf("lww\n");
char ch;
cin>>ch;
return 0;
}
1257

被折叠的 条评论
为什么被折叠?



