C++的基本类型分为两组:
由存储为整数的值组成成整型从大到小依次是:bool、char、signedchar、unsignedchar、short、unsignedshort、int、unsignedint、long、unsignedlong、longlong、unsignedlonglong。
(注:还有一种wchar_t类型,他在序列中的位置取决于实现的系统,wchar_t可以存储系统扩展字符集中的任意成员,short至少为16位,而int至少与short一样长,long至少为32位,且至少和int一样长,确切的长度取决于实现。)由存储为浮点格式的值组成浮点类型有:float、double、longdouble。
(注:c++确保float不比double长,而double不比longdouble长。通常,float使用32位内存,double使用64位内存,longdouble使用80到位。)