c++ int long
时间: 2023-11-04 12:05:55 浏览: 97
在C++中,int和long都是整数类型。它们的大小取决于不同的编译器和操作系统。根据引用\[1\],int的最大值是INT_MAX,它的范围是-2147483648到2147483647。而long的最大值是LONG_MAX,它的范围也是-2147483648到2147483647。所以,int和long在C++中的范围是相同的。
#### 引用[.reference_title]
- *1* *2* [16-C++-基础-整型short、int、long和long long](https://blog.csdn.net/qq_41200424/article/details/80370331)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [c/c++中int,long,long long的取值范围](https://blog.csdn.net/weixin_43107805/article/details/89521922)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文