- #define LOG(x) std::cout<<"Hello"<<std::endl;
- 在项目属性的c++->Preprocesser(预处理)->Preprocesser Define中添加DR_MODULE,将configuration模式调为release
- #ifdef DR_MODULE
#define LOG(x)
#else
#define LOG(x) std::cout<<"Hello"<<std::endl
#endif
只有在DEBUG模式下才会打印日志
标签:定义,Preprocesser,LOG,cout,Debug,Release,DR,define From: https://www.cnblogs.com/wangkaixin-yy/p/17717827.html