使用INT_MAX、INT_MIN需要加上头文件#include<climits>
#include<iostream>
#include<climits>
using namespace std;
int main() {
int max = INT_MIN;
int a = 1;
if (a > max) cout << "1";
else cout << "2";
}
使用INT_MAX、INT_MIN需要加上头文件#include<climits>
#include<iostream>
#include<climits>
using namespace std;
int main() {
int max = INT_MIN;
int a = 1;
if (a > max) cout << "1";
else cout << "2";
}