#pragma pack(1) //以1字节对齐
/*这里填写私有协议*/
typedef struct MsgType{
int type;
long offset;
char hash[130];
} MsgType_t;
#pragma pack()
用#pragam pack前后包裹结构体.
图片来自网络
标签:包内,元素,char,int,MsgType,pragma,对齐,pack
来源: https://blog.csdn.net/bolinnuofu/article/details/116400908