C++中的最大、最小标识符,直接当做常量使用即可。
示例:
#include<iostream> using namespace std; int main() { int x = 12345; int a = x < INT_MAX ? 1 : 0; cout << "a = " << a << endl; cout << "INT_MAX = " << INT_MAX << endl; cout << "INT_MIN = "<< INT_MIN << endl; system("pause"); return 0; }