我想在结构体中嵌入结构体,不知道这样是否可行?请大家帮我看看指导一下
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 跳转至页
回复
打赏帖 | |
---|---|
【OZONE】使用方法总结被打赏20分 | |
【S32K314】芯片启动流程分析被打赏20分 | |
【LP-MSPM0L1306】适配 RT-Thread Nano被打赏20分 | |
今天的咸鱼也是曾经鱼跃龙门的天纵之才,中流击水,浪遏飞舟,粪土当年万户侯,数风流人物,还看今朝,被打赏5分 | |
分享一种检测按键状态的方法被打赏20分 | |
周末总结一下,STM32C0系列的开发经验被打赏50分 | |
【换取手持数字示波器】MicrochipMPLABHarmony框架下定时器配置被打赏20分 | |
【换取手持数字示波器】MicrochipMPLABHarmony框架下PWM配置被打赏20分 | |
【Cortex-M】Systick Timer使用被打赏10分 | |
分享汽车防盗系统的组成与分类(一)被打赏5分 |