请C++高手进来!急!

来源:百度知道 编辑:UC知道 时间:2024/06/18 04:17:07
#define M 10
struct Stack *L{
int data[M];
int top=-1;
};//--------------------------
#define S 100
typedef struct
{
int sta;
int des;
}node;
typedef struct
{
node up[100];
int Last;
}sequenlist;
sequenlist *up;
#define T 100
typedef struct
{
int sta;
int des;
}node;
typedef struct
{
node down[100];
int Last;
}sequenlist;
sequenlist *down;
以上我定义了一个栈和两个顺序线性表,请帮忙找一下错误!
请指出错误,并给出解决方案!

第一个错误,定义结构体时,不可以给成员变量赋值,int top=1;改成int top
第二个错误,你定义了2个
typedef struct
{
int sta;
int des;
}node;
这不是在开玩笑嘛,呵呵
第三个错误,你定义了2个sequenlist,开玩笑too

第2行就是错误的:

struct Stack *L{