C++ 用条件编译 控制开发过程中输出调试信息
#include <iostream>
using namespace std;
#define DEBUGSWITCH 1
int main() {
cout << "Hello World !!!" << endl;
#if DEBUGSWITCH
cout << "Debug Info" << endl;
#endif
return 0;
}呵呵,走到时间的尽头,看来世的路,今朝有酒今朝醉.
#include <iostream>
using namespace std;
#define DEBUGSWITCH 1
int main() {
cout << "Hello World !!!" << endl;
#if DEBUGSWITCH
cout << "Debug Info" << endl;
#endif
return 0;
}