c++ 数据类型

1. 基本内置数据类型和占用字节

char/unsigned char/signed char    1B

int/ unsigned int / signed int         4B

short int                                       2B

long int                                       64位系统: 8B                 32位系统:4B

float                                          4B

double                                      8B

2.字节对齐方式跟结构体中的元素有关

posted @ 2022-11-04 22:08  天凉好个秋秋  阅读(12)  评论(0编辑  收藏  举报