Win32,X86编译配置下变量所占字节数
char: 1 Byte
short: 2 Byte
int: 4 Byte
long: 4 Byte
long long: 8 Byte
float: 4 Byte
double: 8 Byte
long double: 8 Byte
wchar_t:2 Byte
bool: 1 Byte
char*:4 Byte
bool*:4 Byte
short*:4 Byte
int*:4 Byte
long*:4 Byte
float*:4 Byte
double*:4 Byte
long double*:4 Byte
wchar_t*:4 Byte
Win64,X64编译配置下变量所占字节数
char: 1 Byte
short: 2 Byte
int: 4 Byte
long: 4 Byte
long long: 8 Byte
float: 4 Byte
double: 8 Byte
long double: 8 Byte
wchar_t:2 Byte
bool: 1 Byte
char*:8 Byte
bool*:8 Byte
short*:8 Byte
int*:8 Byte
long*:8 Byte
float*:8 Byte
double*:8 Byte
long double*:8 Byte
wchar_t*:8 Byte