|
C51下结构链表编译下出现出错误,请各路大侠高人指点一下
[复制链接]
最用keil C51环境下尝试实现链表结构,总是出现“subs”未定义的错误(如果把结构数组subs提到前面,就会出现“color”"taste"未定义的错误),可以我明明已经定义了,不知道是什么原因,(PS:这段链表结构声明不在主函数里面)链表声明如下:
#define 0 null
typedef struct aItem
{
char * string;
struct aItem * ParentLevel;
struct aIem * ChildLevel;
}bItem;
bItem color[3] =
{
{"black",subs,null},
{"red",subs,null},
{"blue",subs,null}
}
bItem taste[3] =
{
{"bitterness",subs,null},
{"sweet",subs,null},
{"sour",subs,null}
}
bItem subs[2] =
{
{"color",null,color},
{"taste",null,taste},
}
是不是链表结构定义有问题,那么该如何定义,请各位高人指点一下
|
|