现在的位置: 首页 > 综合 > 正文

error:pointer to incomplete class type is not allowed

2014年08月24日 ⁄ 综合 ⁄ 共 258字 ⁄ 字号 评论关闭

pointer to incomplete class type is not allowed

static struct ready_dataconf s_ready_dataconf;

struct ready_dataconf* s_ready_dataconf_a=&s_ready_dataconf;

变量定义要放在对应的.c文件

struct ready_dataconf
{
uint32 id;
int16 len;
};
ready_dataconf 结构体的定义一定要放在.h头文件里面

要是结构体的定义与变量定义放在同一.c文件里面会产生上述错误

抱歉!评论已关闭.