#include "stdio.h"
#include "string.h"
#define maxsize 30
typedef struct
{
int num;
char name[8];
float score;
}elemtype;
typedef struct
{
elemtype elem[maxsize];
int length;
}seqlist;
void create_seqlist(seqlist *L)
{
int i,n,num;
char ss[8];
float score;
printf("please input lise length:\n");
scanf("%d",&n);
L->length=n;
for(i=1;i<=n;i++)
{
printf("qing shu ri num,name,score:\n");
scanf("%d",&num);
getchar();gets(ss);
scanf("%f",&score);
L->elem[i].num=num;
strcpy(L->elem[i].name,ss);
L->elem[i].score=score;
}
}
void print_seqlist(seqlist *L)
{
int i;
printf("the list is:\n");
for(i=1;i<=L->length;i++)
printf("num=%d,name=%s,score=%f\n",L->elem[i].num,L->elem[i].name,L->elem[i].score);
}
void main()
{
seqlist *L;
create_seqlist(L);
print_seqlist(L);
}
哪里出问题了,执行之后有问题 ,不晓得哪里出错了,大伙帮个忙啊 解决