}
i++;
fread(&stu[i],sizeof(STUDENT),1,fp);
}
if(flag==0)
printf("该姓名不存在!!\n");
break;
case 3:return;
default:
printf("请选择编号\n");
}
}
fclose(fp);
fp=fopen("c:\\score.dat","wb");
if(fp==NULL)
{
printf("Open error!!");
getch();
exit(0);
}
for(i=0;i<N;i++){
fwrite(&stu[i],sizeof(STUDENT),1,fp);
}
fclose(fp);
}
void stu_del() /*删除学生信息函数*/
{
STUDENT s[N];
int i,j,number,flag,n=0;
char name1[8],num1[12];
FILE *fp=NULL;
title("删除学生信息\n");
gotoxy(28,5);
printf("**********************\n");
gotoxy(28,6);
printf("*****1.按学号删除*****\n");
gotoxy(28,7);
printf("*****2.按姓名删除*****\n");
gotoxy(28,8);
printf("*****3.退出本菜单*****\n");
gotoxy(28,9);
printf("**********************\n");
fp=fopen("c:\\score.dat","rb");

