C++ Primer 4 CPP Note 2.1 基本内置类型

C++的基本内置类型分为一种称为void的特殊类型和算术类型(arithmetic type) .算术类型又分为:整型(integeral)、浮点型.

整型又分为:整数,字符,布尔值
.
C++算术类型:(不同的编译环境或者系统会不一样的,以下是32位windows)可以使用sizeof操作符查看。
//================算术类型=============
//------------------------整型-----------------------------------
bool 布尔型 -----
char 字符型 8bit
wchar_t 宽字符型 16bit
short 短整型 16bit
int 整型 32bit
long 长整型 32bit
//----------------------浮点型---------------------------------
float 单精度浮点型 32bit 6位有效数字
double 双精度浮点型 64bit 10位有效数字
long double 扩展精度浮点型 96bit or 128bit 10位有效数字


原文地址:https://www.cnblogs.com/coveted/p/2212003.html