这个代码错在哪里??
#define maxlen 100
typedef struct
{int data[maxlen];
int listlen;
}seqlist;
#include<stdio.h>
void main()
{
void initial_list(seqlist L);
void list_insert(seqList *&L,int i,ElemType e)
seqlist L;
int i,x;
int data[]={1,2,3,4,5,6,7,8,9,10};
printf("please enter a num:");
scanf("%d",&x);
list_insert(L,x);
printf("输出插入后的顺序:");
for(i=0;i<L.listlen;i++)
printf("%5d",L.data[i]);
}
void initial_list(seqlist *L)
{
L->listlen=0;
}
void list_insert(seqList *&L,int i,ElemType e)
{int j=L.listlen-1;
if(j>maxlen) printf("overflow");
else{
while(j>=0 && L.data[j]>x)
{L.data[j+1]=L.data[j];
j--;
}
L.data[j+1]=x;
L.listlen++;
}
}