我在最后一行得到警告“参数类型不完整”。但我不知道为什么。
struct clockClass {
uint32_t (*getClock) (void);
bool (*setCorrectionFactor)(uint32_t newCorrectionFactor);
uint32_t (*getCorrectionFactor) (void);
};
/* Type definition for ::virtualClock */
typedef struct clockClock ClockClass;
/* VC Synchronization Class */
struct vcSync_sRio {
bool (*vcSync)(ClockClass me); /*Warning LINE*/
};发布于 2013-02-15 18:24:36
看起来这只是一个打字错误:您已经定义了struct clockClass,但是您的typedef为struct clockClock定义了一个别名。
将typedef更改为:typedef struct clockClass ClockClass;
发布于 2013-02-15 18:22:32
将行更改为:
bool (*vcSync)(struct ClockClass me);或将另一行更改为:
typedef struct ClockClass ClockClass;https://stackoverflow.com/questions/14892568
复制相似问题