购买
下载掌阅APP,畅读海量书库
立即打开
畅读海量书库
扫码下载掌阅APP

◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎ ◎

1.2 常见数据类型及其表达范围

C++中常用的数据类型如下。

● int:整型。

● char:字符型。

● string:字符串型。

● float:浮点型(单精度)。

● double:浮点型(双精度)。

● short:短型。

● long:长型。

● signed:有符号型。

● unsigned:无符号型。

各种数据类型所占的字节数和表达范围如下。

● short:2 bytes,-32768~32767。

● int:4 bytes,-2147483648~2147483647。

● long:4 bytes,-2147483648~2147483647。

● long long:8 bytes,-9223372036854775808~9223372036854775807。

● long double:16 bytes,3.3621e-4932~1.18973e+4932。 t2j++aM66Lo6NyhadHABpel3B1krfHfP4Z7TtEcCuu9ZGyVVNgY4XCPJG1qgqUNt

点击中间区域
呼出菜单
上一章
目录
下一章
×