标准的32位的系统:
char 1个字节
short 2个字节
int 4个字节
long: 4个字节
float: 4个字节
double: 8个字节
long long: 8个字节
16位,32位,64位平台固定的
float:4个字节
double: 8个字节
跨平台运用
typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
最后
以上就是苗条蜜蜂最近收集整理的关于C/C++中数据类型在不同平台下所占字节数的全部内容,更多相关C/C++中数据类型在不同平台下所占字节数内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复