#include<stdio.h>
#include<string.h>
#include<malloc.h>
#define LIST_MAXSIZE 50
typedef struct addresslist
{
char name[10];
char number[10];
int age;
char add[20];
}ST;
typedef struct
{
ST add_person[10];
int length;
int listsize;
}SqList;
void creataddresslist(SqList *&L,ST a[],int n)
{ int x,k;
L=(SqList *) malloc(LIST_MAXSIZE *sizeof(SqList));
L->length=0;
if((L->length==0))
printf("此表为空表!\n") ;
else printf("此表不是空表");
scanf("%d",&x);
while(x!=-1)
{ L-> add_person[k] =a[x];
printf("请输入学生姓名;\n");
scanf("%s",& a[x].name);
printf("请输入电话号码;\n");
scanf("%s",&a[x].number);
printf("请输入年龄;\n");
scanf("%d",&a[x].age) ;
printf("请输入住址;\n");
scanf("%s",&a[x].add);
x++;k++;
L->length=k;
}
int main()
{ void creataddresslist(SqList *&L,ST a[],int n) ;(问题出现在此处)总是显示 A function definition allowed here before{token
int i;
int j;
SqList L;
char student[i];
printf("查看学生通讯录\n");
scanf("%s",&student[i]);
scanf("%d",&j);
student[i]=creataddresslist(L,a[j],49); (Stray163in Program)(Stray173 In program )
for(i=0;i<50;i++)
{
student[i]= (SqList *) malloc(listsizeof(sudent));
scanf("%d",&j);
scanf("%s",& a[j].name);
printf("请输入学生姓名;%s\n",a[j].name);
scanf("%s",&a[j].number);
printf("请输入电话号码;%s\n",a[j],number);
scanf("%d",&a[j],age) ;
printf("请输入年龄;%d\n",a[j].age);
scanf("%s",&a[j].add);
printf("请输入住址;%s\n",a[j].add);
i++;j++;
}
return 0;
}expected }at end of input