出错,提示说未声明该变量。
程序代码:#include <stdio.h>
#define NUMBER 4
#define CSIZE 4
void students(void);
struct mane{//姓名
char surname[NUMBER];
char called[NUMBER];
};
struct subjects{//三科成绩
float chinese[NUMBER];
float mathematical[NUMBER];
float english[NUMBER];
};
struct student{
struct mane handle[NUMBER];
struct subjects grade[NUMBER];
float average[NUMBER];//三科平均分
};
int main(void)
{
struct student scores[CSIZE];
stdudets();
}
void stdudets (void)
{
int i;
for(i=0;i<=CSIZE;i++)
{
printf("请输入学生姓:");
gets("cores.handle.surname[i]");
printf("请输入学生名:");
gets("cores.handle.called[i]");
printf("请输入语文成绩:");
scanf("%d",&scores.grade.chinese[i]);
printf("请输入数学成绩:");
scanf("%d",&scores.grade.mathematical[i]);
printf("请输入英语成绩:");
scantf("%d",&scores.grade.english[i]);
return 0;
}
}
我不是在main函数那里声明了吗?




