}
delete Head, End;
}
int studentmanage::comparexh(char xuehao[20]) { //********判断学号是否重复
student * p = NULL;
if (p = finditem(xuehao)) {
cout << "该学号的学生信息已存在! " << endl;
return 0;
}
else return 1;
}
int studentmanage::comparexh2(char xuehao[20]) { //********在选课时判断是否有该学生
student * p = NULL;
if (p = finditem(xuehao)) return 0;
else {
cout << "你输入的学号不对! " << endl;
return 1;
}
}
int studentmanage::comparename(char xuehao[20], char name[20]) { //******** 在选课时判断
姓名是否正确
student * p = finditem(xuehao);
if (!strcmp(p->next->name, name)) return 0;
else {
cout << "你输入的姓名不对! " << endl;
return 1;
}
}
void studentmanage::ShowMenu() { //*******学生管理菜单
cout<<"\t\t"<<"┏━━━━━━━━━━━━━━━━━━━━━━━┓"<<endl;
cout<<"\t\t"<<"┃"<<"\t\t "<<"学生信息管理"<<"\t\t"<<"┃"<<endl;
cout<<"\t\t"<<"┃"<<"\t\t\t\t\t\t"<<"┃"<<endl;
cout<<"\t\t"<<"┃"<<"\t\t"<<"0.返回上层"<<"\t\t\t"<<"┃"<<endl;
cout<<"\t\t"<<"┃"<<"\t\t"<<"1.增加学生信息"<<"\t\t\t"<<"┃"<<endl;
cout<<"\t\t"<<"┃"<<"\t\t"<<"2.显示学生信息"<<"\t\t\t"<<"┃"<<endl;
cout<<"\t\t"<<"┃"<<"\t\t"<<"3.查找学生信息"<<"\t\t\t"<<"┃"<<endl;
cout<<"\t\t"<<"┃"<<"\t\t"<<"4.删除学生信息"<<"\t\t\t"<<"┃"<<endl;
cout<<"\t\t"<<"┃"<<"\t\t"<<"5.修改学生信息"<<"\t\t\t"<<"┃"<<endl;
cout<<"\t\t"<<"┃"<<"\t\t"<<"6.保存学生信息"<<"\t\t\t"<<"┃"<<endl;
cout<<"\t\t"<<"┗━━━━━━━━━━━━━━━━━━━━━━━┛"<<endl<<endl;
}
void studentmanage::display() { //*****管理员端显示学生信息
for (student * p = Head->next; p != End; p = p->next)
p->show1();