#define listsize 100
#include <stdio.h>
#include <stdlib.h>
void error(char *message)
{printf("%d\n",message);
exit(1);
}
struct seqlist{
int data[listsize];
int length;};
void initlist(struct seqlist *l)
{l->length=0;}
void inserlist(struct seqlist *l,int x,int i)
{int j;
if (i<0||i>l->length)
error("position error");
if (l->length>=listsize)
error("overflow");
for(j=l->length-1;j>=i;j--)
l->data[i]=x;
l->length++;
}
void displaylist(struct seqlist *l)
{int i;
puts("now the list is:");
for(i=0;i<l->length;i++)
printf("\n");
return;}
void main()
{struct seqlist *SEQA;
int i,n,t;
SEQA=(struct seqlist*)malloc(sizeof(struct seqlist));
initlist(SEQA);
clrscr();
puts("please input the size of the list:");
scanf("%d",&n);
puts("please input the elements of the list one by one:");
for(i=0;i<n;i++)
{scanf("%d",&t);
insertlist(SEQA,t,i);}
displaylist(SEQA);}
运行出现undefinsd symbo '_insertlist ' in moudle 11.c(11.c是保存文件名)
小弟先谢谢各位了