急!!!C语言编程改错

来源:百度知道 编辑:UC知道 时间:2024/05/14 17:53:48
是学生管理系统中的两段程序,请高手帮忙看下哪里有问题!
错误提示说:error C2601: 'del' : local function definitions are illegal
error C2601: 'main' : local function definitions are illegal

void del()
{
printf("Please input the student's number you want to delete:");
int n,i,j;
scanf("%d",&n);
printf("no\t name\t");
for(j=0;j<N;j++)
printf("score%d\t",j+1);
printf("sum\t average\t");
for(i=0;i<X;i++)
{
if (stu[i].no==n) continue;
printf("%d\t %s\t",stu[i].no,stu[i].name);
for(j=0;j<N;j++)
printf("%d\t",stu[i].score[j]);
printf("%d\t %.f\t",stu[i].sum,stu[i].average);
}

}
void main()
{
int n;
menu();
printf("Input the list first!\n");
input();
printf("Please input your choi

你这个没办法帮你,很可能错误并不在这两个函数里面,而是你前面某个地方有错。

函数名不合法..或者说有一个这样的库函数...

void del(void)
{

}

你把del都换一下,换成dele