我想在结构体中嵌入结构体,不知道这样是否可行?请大家帮我看看指导一下
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;
此帖出自
Linux与安卓论坛
被老板骂了个狗血淋头
谢谢指点,分开了
谢谢指点,确实太冗杂了,模块化是重点
嗯嗯,还是跟着老板的风格走
一周热门 更多>