关于#if条件编译
直接帖代码啦,基础问题,一看就懂。
=============================
#include <iostream>
using namespace std;
const int UP = 1;
int main()
{
#if (UP)
cout << "Y" << endl;
#else
cout << "N" << endl;
#endif
system("pause");
return 0;
}
但是这个程序输出的始终是N,如果我使用#define UP 1语句
或者直接将括号里的UP替换成1,就会输出Y,为什么用const语句不行呢?????还望各位高手指教。
PS:我使用的是DEV C++ 4.9.9.2