int: 4个字节 unsigned int : 4个字节 float: 4个字节 double: 8个字节 long: 4个字节 long long: 8个字节 unsigned long: 4个字节 64位编译器: char :1个字节 char*(即指针变量): 8个字节 short int : 2个字节 int: 4个字节 unsigned int : 4个字节 float: 4个字节 double: 8个字节 long: ...
测试数据类型在32位系统下字节 #include <iostream> usingnamespacestd; intmain() { cout<<sizeof(char)<<endl; cout<<sizeof(short)<<endl; cout<<sizeof(unsigned)<<endl; cout<<sizeof(int)<<endl; cout<<sizeof(unsignedint)<<endl; cout<<sizeof(long)<<endl; cout<<sizeof(unsignedlong)<<...