主题:帮忙找下错误 谢谢
//顺序表初始化
#include<stdio.h>
#include<malloc.h>
#define MAXSIZE 100
typedef int datatype//抽象为datatype类型
typedef struct
{
datatype data[MAXSIZE];
int last;
}SeqList;//初始化SeqList
SeqList *Init_SeqList()
{
SeqList *L;
L=(SeqList*)malloc(sizeof(SeqList)); //sizeof计算x的长度
L->last=-1;
return L;
}
void main()
{
SeqList *L,int i;
L=Init_SeqList();
for(i=0;i<=5;i++)
scanf("%d",&L->data[i]);
for(i=0;i<=5;i++)
printf("%d\n",L->data[i]);
}
#include<stdio.h>
#include<malloc.h>
#define MAXSIZE 100
typedef int datatype//抽象为datatype类型
typedef struct
{
datatype data[MAXSIZE];
int last;
}SeqList;//初始化SeqList
SeqList *Init_SeqList()
{
SeqList *L;
L=(SeqList*)malloc(sizeof(SeqList)); //sizeof计算x的长度
L->last=-1;
return L;
}
void main()
{
SeqList *L,int i;
L=Init_SeqList();
for(i=0;i<=5;i++)
scanf("%d",&L->data[i]);
for(i=0;i<=5;i++)
printf("%d\n",L->data[i]);
}