P
Python.LeoJay
dear all,
i compiled the following code in VC8.0 and the output was "a < 2", but
in fact, the a is 3.
why the compiler thought the expression a<2 is true?
thanks.
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
const int a = 3;
#if (a < 2)
cout << "a < 2" << endl;
#endif
return 0;
}
i compiled the following code in VC8.0 and the output was "a < 2", but
in fact, the a is 3.
why the compiler thought the expression a<2 is true?
thanks.
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
const int a = 3;
#if (a < 2)
cout << "a < 2" << endl;
#endif
return 0;
}