#pragma pack(push) #pragma pack(4) typedef struct { double d1; int member; char ch; int member2; }s_member; #pragma pack(pop)
sizeof(s_member): 20
VC,GCC都支持
#pragma pack(push) #pragma pack(4) typedef struct { double d1; int member; char ch; int member2; }s_member; #pragma pack(pop)
sizeof(s_member): 20
VC,GCC都支持