顺序表的建立与操作请人帮忙
Turbo C编译环境 我的myl.h文件
# define maxsize 30
# define datatype int
typedef struct
{
datatype data [maxsize];
int last;
}SEQLIST;
SEQLIST *init_seqlist()
{
SEQLIST *L;
L=(SEQLIST *)malloc(sizeof(SEQLIST));
L->last=0;
return L;
}
void shu(SEQLIST *L)
{
int i, j, k;
printf("please input the data,end of -99\n");
j=0;
k=1;
scanf("%d",&i);
while(i!=-99&&j<maxsize)
{
j++;
L->data[k]=i;
k++;
scanf("%d",&i);
}
}
void chu(SEQLIST *L)
{
int k;
for(k=1;K<L->last;k++)
printf("%d", L->data[k]);
}
int ins_seqlist(SEQLIST *L,int i,int x)
{ int j;
if(L->last==MAXSUZE){
printf("biao man");return(-1);}
if(i<1||i>L->last+1){
printf("wei zhi cuo");return(0);}
for(j=L->last;j>=i;j--)
L->data[j]=L->data[j-1];
L->data[i-1]=x;
L->last++;
return(1);
}
我的sl.c文件
#include "myl.h"
#include<stdio.h>
main()
{
SEQLIST *L;
datatype x;
int i,j;
L=init_seqlist();
shu(L);
chu(L); 错误提示:undefined smbol ’_chu' in module sl.c
}