C++中各数据类型大小

平台:win10,x64,visual studio 2015

语言:C++

各数据类型对象占内存空间:

sizeof(unsigned short)      2 bytes

sizeof(short)                    2 bytes

sizeof(unsigned)              4 bytes

sizeof(int)                       4 bytes

sizeof(unsigned long)       4 bytes

sizeof(long)                     4 bytes

sizeof(float)                    4 bytes

sizeof(double)                 8 bytes

posted @ 2017-09-14 10:40  Avin  阅读(573)  评论(0编辑  收藏  举报