else
{
*p2=*p1;
*p1=(*p1)->next;
}
else
{
*p2=*p1;
*p1=(*p1)->next;
}
}
else
{
*p2=*p1;
*p1=(*p1)->next;
}
}
return *p1?1:0;
}
int CLASS::Findtwo(char *nterm,char*NCLASS,STUDENT **p1,STUDENT **p2)
{while(*p1)
{
if(strcmp((*p1)->term,nterm)==0)
{ if(strcmp((*p1)->cname,NCLASS)==0)
break;
else
{ *p2=*p1;
*p1=(*p1)->next;
}}
else
{
*p2=*p1;
*p1=(*p1)->next;
}
}
return *p1?1:0;
}
int CLASS::Findthree(char*NCLASS,STUDENT **p1,STUDENT **p2)
{while(*p1)
{
if(strcmp((*p1)->cname,NCLASS)==0)
{break;}
else
{ *p2=*p1;
*p1=(*p1)->next;
}
}
return *p1?1:0;
}
void CLASS::Modify()
{cout<<"\n** 修改学生 **\n";
char nterm[10];
char NCLASS[10];
char nname[10];
STUDENT *p1,*p2;
cout<<"学期:"; cin>>nterm;
cout<<"班级:"; cin>>NCLASS;
cout<<"姓名:";cin>>nname;
if(!Find(nterm,NCLASS,nname,&p1,&p2))
{cout<<"抱歉,指定的学生没有找到!\n";}
else
{ STUDENT::OutputT();
p1->Output();
p1->Input();
cout<<"好的,修改完成了!\n";
}
}
void CLASS::Query()
{cout<<"\n** 查询学生 **\n";
char nterm[10];
char NCLASS[10];
char nname[10];
STUDENT *p1,*p2;
cout<<"学期:"; cin>>nterm;
cout<<"班级:"; cin>>NCLASS;
cout<<"姓名:";cin>>nname;
if(!Find(nterm,NCLASS,nname,&p1,&p2))
{cout<<"抱歉,指定的学生没有找到!\n";}
else
void CLASS::Query2()
{ cout<<"\n** 查询学生 **\n";
char nterm[10];
char NCLASS[10];
char id[10];
STUDENT *p1,*p2;
cout<<"学期:"; cin>>nterm;
cout<<"班级:"; cin>>NCLASS;
cout<<"学号:";cin>>id;
if(!Find2(nterm,NCLASS,id,&p1,&p2))
{cout<<"抱歉,指定的学生没有找到!\n";}
else
{STUDENT::OutputT();
p1->Output(); }
}
void CLASS::Print()
{ STUDENT *p1,*p2;
p1=SL->next;
p2=SL;
char nterm[10];
char NCLASS[10];
cout<<"请您输入学期:";
cin>>nterm;
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>