急急急,求大神解决结构体问题!!!
发表在C语言图书答疑 2013-06-11
是否精华
版块置顶:
我在一个文件中定义结构体
typedef struct  
{
   char name[20];              //地点名称
   int code;                   //地点代号
   char introduction[50];        //地点信息
}Place; 
typedef struct
{
Place list[MaxSize];
int size;
}SeqList;
在另一个文件中定义了结构体
#include"SeqList.h"
typedef struct
{
SeqList Vertices;
int edge[MaxVertices][MaxVertices];
int numOfEdges;
}AdjMGraph;
为什么报错,下面是一部分报错:
error: `Place' does not name a type
error: 'struct SeqList' has no member named 'list'
error: 'struct SeqList' has no member named 'list'
error: 'struct SeqList' has no member named 'list'
error: conflicting declaration 'typedef struct SeqList SeqList'
error: 'SeqList' has a previous declaration as `typedef struct SeqList SeqList'
分享到:
精彩评论 1
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照