我想在结构体中嵌入结构体,不知道这样是否可行?请大家帮我看看指导一下
typedef struct Register
{
struct RegisterRequest
{
short UnitLength;
byte UnitType; // 0x01 is for RegisterRequest
short LocalApplyPort;
long double LocalApplyID;
}tRegisterRequest;
struct RegisterReply
{
short UnitLength;
byte UnitType; // 0x02 is for RegisterReply
byte Return; // return 0 if it is successful, return other number if not successful
}tRegisterReply;
}tRegister;
共2条
1/1 1 跳转至页
struct RegisterRequest { short UnitLength; byte UnitType; // 0x01 is for RegisterRequest short LocalApplyPort; long double LocalApplyID; }; struct RegisterReply { short UnitLength; byte UnitType; // 0x02 is for RegisterReply byte Return; // return 0 if it is successful, return other number if not successful }; typedef struct Register { struct RegisterRequest tRegisterRequest; struct RegisterReply tRegisterReply; }tRegister;
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |