You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
526 B

#include "mysyslib.h"
void cancel(ss*stu){
char* tmp = (char*)malloc(sizeof(char)*3);
do{
char*ID = (char*)malloc(sizeof(char)*5);
scanf("%s",ID);
for(int i = 0; i < stu->nums; ++i){
if(strcmp(stu->student[i].id,ID)){
for(int j = i; j < stu->nums-1; ++j){
stu->student[j] = stu->student[j+1];
}
}
}
allPrint(stu);
printf("continue?\n");
scanf("%s",tmp);
}while(strcmp(tmp,"yes"));
}