gpt4 book ai didi

C++ 结构大小 : 2+4+2+2+4 = 16

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:25:01 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Why isn’t sizeof for a struct equal to the sum of sizeof of each member?

为什么这个结构体的sizeof();是16字节?我正在用 g++ 编译。

struct bitmapfileheader {       
unsigned short bfType;
unsigned int bfSize;
unsigned short bfReserved1;
unsigned short bfReserved2;
unsigned int bfOffBits;
};

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com