gpt4 book ai didi

c++ - int 和 long 有什么区别?

转载 作者:太空狗 更新时间:2023-10-29 23:54:12 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
What is the difference between an int and a long in C++?
difference in long vs int data types in C++

在c++中这是int和long数据类型的区别。编写了以下代码:

int _tmain(int argc, _TCHAR* argv[])
{
cout<<"Int_Max = "<<INT_MAX<<endl;
cout<<"Int_Min = "<<INT_MIN<<endl;
cout<<"Long_Max = "<<LONG_MAX<<endl;
cout<<"Long_Min = "<<LONG_MIN<<endl;
}

这就是结果......

Int_Max = 2147483647
Int_Min = -2147483648
Long_Max = 2147483647
Long_Min = -2147483648

我很困惑。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com