socket通信像结构体中嵌套结构体时,收到的数据错误,谁遇到过?求大神们指导
传输的结构如下:
struct CatchFish {
int fish_id;
int fish_kind;
SCORE fish_score;
bool bullet_double;
int link_fish_id;
bool bullet_invincible;
bool sepcial_sence;
int special_fish_kind_;
DWORD special_start_fish_id;
};
struct CMD_S_CatchFishGroup {
DWORD tick_count;
WORD chair_id;
int fish_count;
CatchFish catch_fish[kMaxCatchFishCount_FishLK2];
int bullet_id;
};
像这样的数据,在catch_fish的第一个数据fish_id是对的,其他的大部分是错误的?这是什么原因造成的?