c++11 long long 类型


代码如下~

#include <iostream>
#include <limits>  
using namespace std;
int main()
{
    cout << "type: \t\t" << "************size**************"<< endl;  
    cout << "bool: \t\t" << "所占字节数:" << sizeof(long long);  
    cout << "\t最大值:" << (numeric_limits<long long>::max)();  
    cout << "\t\t最小值:" << (numeric_limits<long long>::min)() << endl;  
    // << "\t最大值:" << (numeric_limits<string>::max)() << "\t最小值:" << (numeric_limits<string>::min)() << endl;  
    cout << "type: \t\t" << "************size**************"<< endl;  
    return 0;  
} 



PS:limits是表示我们数据类型范围的一个类,大家可以进入这个类中看看

相关文章:

  • 2021-07-23
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-02-04
  • 2022-01-11
猜你喜欢
  • 2021-09-28
  • 2022-01-04
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-10-18
  • 2021-05-16
相关资源
相似解决方案