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