使用C++工具检查类型长度
#include <iostream>
#include <climits>
int main()
{
using namespace std;
int n_int = INT_MAX;
short n_short = SHRT_MAX;
long n_long = LONG_MAX;
long long n_llong = LLONG_MAX;
cout << sizeof(int) << " " << n_int << endl
<< sizeof n_short << " " << n_short << endl
<< sizeof n_long << " " << n_long << endl
<< sizeof n_llong << " " << n_llong << endl;
return 0;
}