基本的内置类型
基本内置类型 | 关键字 |
---|---|
布尔型 | bool |
字符型 | char |
整型 | int |
浮点型 | float |
双浮点型 | double |
无类型 | void |
宽字符型 | wchar_t |
类型范围
类型 | 范围 |
---|---|
unsigned int | 0~4294967295 |
int | -2147483648~2147483647 |
unsigned long | 0~4294967295 |
long | -2147483648~2147483647 |
long long的最大值 | 9223372036854775807 |
long long的最小值 | -9223372036854775808 |
unsigned long long的最大值 | 1844674407370955161 |
__int64的最大值 | 9223372036854775807 |
__int64的最小值 | -9223372036854775808 |
unsigned __int64的最大值 | 18446744073709551615 |
注意:从上表可得知,变量的大小会根据编译器和所使用的电脑而有所不同。