1. 介绍
a. 包含于头文件 “climits” 当中
b. INT_MIN, INT_MAX, UINT_MAX 分别可以得到整型变量的最小值,最大值
c. 得到long long int 相关的最值
2. 使用
2.1 INT
#include<iostream>
#include<climits>
using namespace std;
int main(){
int x = INT_MIN;
int y = INT_MAX;
unsigned int z = UINT_MAX;
cout << x << '\n' << y << '\n' << z ;
}
2.2 Long Long
#include<iostream>
#include<climits>
using namespace std;
int main(){
long long x = LLONG_MIN;
long long y = LLONG_MAX;
unsigned long long z = ULLONG_MAX;
cout << x << '\n' << y << '\n' << z ;
}