其他分享
首页 > 其他分享> > 3.14-1 类型详述

3.14-1 类型详述

作者:互联网

#include <iostream>
#include <limits>

int main()
{
    std::cout << sizeof(int) << "\n";
    std::cout << std::numeric_limits<int>::min() << "\n";
    std::cout << std::numeric_limits<int>::max() << "\n";

    unsigned int x = 10;
    x = std::numeric_limits<unsigned int>::max() + 1;  //上溢出
    std::cout << x << "\n";
    x = std::numeric_limits<unsigned int>::min() - 1;  //下溢出
    std::cout << x << "\n";
}
/sys/devices/system/cpu/cpu0/cache/index0$ cat coherency_line_size
64

标签:详述,std,cout,cache,3.14,类型,line,溢出,size
来源: https://www.cnblogs.com/levylaw/p/16410818.html