可能重複:
What is the difference between an int and a long in C++?
difference in long vs int data types in C++int和long有什麼區別?
在C++中這是int和長數據類型之間的性差異。寫了下面的代碼:
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
我很困惑。
看不到哪裏提升和遊戲編程適合? –
或者遊戲編程。 –
回答之前:[Link1](http://stackoverflow.com/questions/900230/difference-in-long-vs-int-data-types-in-c)[Link2](http://stackoverflow.com/問題/ 271076/int-and-a-long-in-c之間的區別) – SpeedBirdNine