32位与64位系统各个变量所占空间大小

来源:互联网 发布:excel sql建立数据库 编辑:程序博客网 时间:2024/06/09 17:45

Win32,X86编译配置下变量所占字节数

char: 1 Byteshort: 2 Byteint: 4 Bytelong: 4 Bytelong long: 8 Bytefloat: 4 Bytedouble: 8 Bytelong double: 8 Bytewchar_t:2 Bytebool: 1 Bytechar*:4 Bytebool*:4 Byteshort*:4 Byteint*:4 Bytelong*:4 Bytefloat*:4 Bytedouble*:4 Bytelong double*:4 Bytewchar_t*:4 Byte

Win64,X64编译配置下变量所占字节数

char: 1 Byteshort: 2 Byteint: 4 Bytelong: 4 Bytelong long: 8 Bytefloat: 4 Bytedouble: 8 Bytelong double: 8 Bytewchar_t:2 Bytebool: 1 Bytechar*:8 Bytebool*:8 Byteshort*:8 Byteint*:8 Bytelong*:8 Bytefloat*:8 Bytedouble*:8 Bytelong double*:8 Bytewchar_t*:8 Byte
0 0