首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

请教结构的成员可不可以是结构

2012-03-22 
请问结构的成员可不可以是结构?typedefstructnode{intdatastructnode*next}Nodetypedefstructpathinfo(

请问结构的成员可不可以是结构?
typedef   struct   node{
int   data;
        struct   node   *next;
      }Node;

typedef   struct   pathinfo(
struct   node**   pathSor;
struct   node**   pathDes;
int   sorLength;
int   desLength;
)PathInfo;

为什么不能编译呢?



[解决办法]
typedef struct pathinfo{
struct node** pathSor;
struct node** pathDes;
int sorLength;
int desLength;
}PathInfo;

热点排行