}
printf("\nPlease input ID which you want to del:"); scanf("%d",&i);getchar();
while((fread(&data,sizeof(data),1,fp))==1) {
j=atoi(data.xuehao); if(j==i) {
printf("Anykey will delet it.\n"); getch(); continue; }
fwrite(&data,sizeof(data),1,fp1); }
fclose(fp); fclose(fp1);
remove("s_score.txt");
rename("temp.txt","s_score.txt");
printf("Data delet was succesful!\n"); printf("Anykey will return to main."); getch(); }
main() {
while(1) {
clrscr();
printf("*************welcome to use student manage******************\n"); printf("*************************menu********************************\n"); printf("* ========================================================= * \n"); printf("* A>shuru B>xiugai * \n"); printf("* C>shanchu D>chazhao * \n"); printf("*E>xianshi F>exit * \n"); printf("* * \n");
printf("* --------------------------------------------------------- * \n"); printf(" Please input which you want(A-F):"); ch=getch(); switch(ch) {
case 'A':shuru();break; case 'B':xiugai(); break; case 'C':shanchu(); break;