求大神指点!请问错在哪?
代码如下:#include<stdio.h>
#include<stdlib.h>
#define LEN sizeof(struct Student)
struct Student
{
char name[10];
float sorce;
struct Student *next;
};
struct Student *Creat()
{
int n,i;
struct Sutdent *p1=NULL;
struct Sutdent *p2=NULL;
struct Sutdent *head;
head=(struct Student *)malloc(sizeof(struct Student));
//head->next=NULL;
p1=head;
if(head=NULL)
{
printf("创建失败\n");
return NULL;
}
// else
// {
printf("请问有几个学生?/n");
scanf("%d",&n);
for(i=0;i<n;i++)
{
p2=(struct Student *)malloc(sizeof(struct Student));
printf("请输入学生的名字和成绩/n");
scanf("%s %f",&(p2->name),&(p2->sorce));
p2=p2->next;
p2=p1;
}
}
出现以下错误:error C2037: left of 'name' specifies undefined struct/union 'Sutdent'
error C2037: left of 'sorce' specifies undefined struct/union 'Sutdent'