我正在寻找有关基本C++类型大小的详细信息.我知道这取决于架构(16位,32位,64位)和编译器.
但是有没有C++的标准?
我在32位架构上使用Visual Studio 2008.这是我得到的:
char : 1 byte
short : 2 bytes
int : 4 bytes
long : 4 bytes
float : 4 bytes
double: 8 bytes
Run Code Online (Sandbox Code Playgroud)
我试图找到,但没有成功,可靠的信息,表述的大小char,short,int,long,double,float(和其他类型的我没想到的),在不同的体系结构和编译器.