cout<<\©§³öÏÖÁËÏàͬµÄѧºÅ£¬ÇëÖØÐÂÊäÈë©§\
cout<<\©»©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¿\
} }
curnode=p;
cout<<\ÐÕ Ãû£º\cin>>Name;
while(1) { cout<<\¼ÆËã»ú£º\
cin>>Computer; while(cin.fail()) {
err_char();
cout<<\¼ÆËã»ú£º\cin>>Computer;
}
if(Computer>=0&&Computer<=100) break; else
score_err();
}
while(1) { cout<<\Ó¢ Ó\ }
while(1) { cout<<\Êý ѧ£º\
cin>>Math; while(cin.fail()) { err_char();
16
cin>>ENglish; while(cin.fail()) { }
err_char();
cout<<\Ó¢ Ó\cin>>ENglish;
if(ENglish>=0&&ENglish<=100) break; else score_err();
}
cout<<\Êý ѧ£º\
cin>>Math; }
if(Math>=0&&Math<=100) break; else
score_err();
}
this->app_score(Number,Name,Computer,ENglish,Math); cout<<\©³©¥©¥©¥©¥©¥©¥©¥©¥©·\cout<<\©§!ÒÑÌí¼ÓÒ»Ìõ¼Ç¼!©§\cout<<\©»©¥©¥©¥©¥©¥©¥©¥©¥©¿\cout<<\
//////////////////////////////////////////²éÕÒº¯ÊýµÄʵÏÖ void student::lookup(int n,string str) { student *p=curnode;
bool b;
//¶¨Òåi=1£¬µ±ÕÒµ½Êý¾Ýʱ°ÑiÖÃΪ0.ÓÃÓÚÊä³öûÓÐÕÒµ½Êý¾Ý int i=1;
if(!(curnode=head->next)) { cout<<\©³©¥©¥©¥©¥©¥©¥©¥©·\ cout<<\©§!ÕâÊÇÒ»¸ö¿Õ±í!©§\
cout<<\©»©¥©¥©¥©¥©¥©¥©¥©¿\curnode=p;
cout<<\return;
} cout<<\©³©¥©¥©¥©¥©¥©×©¥©¥©¥©¥©¥©×©¥©¥©¥©×©¥©¥©¥©×©¥©¥©¥©×©¥©¥©¥©¥©×©¥©¥©¥©¥©×©¥©¥©·\ cout<<\©§ ѧºÅ ©§ ÐÕÃû ©§¼ÆËã»ú©§ Ó¢Óï ©§ Êýѧ ©§ ×Ü·Ö ©§ ƽ¾ù·Ö ©§µÈ¼¶©§\
cout<<\©Ç©¥©¥©¥©¥©¥©ï©¥©¥©¥©¥©¥©ï©¥©¥©¥©ï©¥©¥©¥©ï©¥©¥©¥©ï©¥©¥©¥©¥©ï©¥©¥©¥©¥©ï©¥©¥©Ï\while(curnode!=NULL) {
switch(n) {
case 1: b=curnode->number==str;break; case 2: b=curnode->name==str;break;
default: return; } if(b)
17
{
i=0;
cout<<\©§\cout<<\©§\cout<<\©§\cout<<\©§\cout<<\©§\curnode->sum_score(); cout<<\©§\curnode->ave_score();
cout<<\©§\curnode->grade_score();
cout<<\©§\©§\
cout<<\©Ç©¥©¥©¥©¥©¥©ï©¥©¥©¥©¥©¥©ï©¥©¥©¥©ï©¥©¥©¥©ï©¥©¥©¥©ï©¥©¥©¥©¥©ï©¥©¥©¥©¥©ï©¥©¥©Ï\
} curnode=curnode->next; }
//µ±i=1ÊÇ´ú±íûÓÐÕÒµ½Êý¾Ý if(i) {
cout<<\©Ç©¥©¥©¥©¥©¥©ß©¥©¥©¥©¥©¥©ß©¥©¥©¥©ß©¥©¥©¥©ß©¥©¥©¥©ß©¥©¥©¥©¥©ß©¥©¥©¥©¥©ß©¥©¥©Ï\ cout<<\©§Ã»ÓÐÆ¥ÅäµÄÊý¾Ý
©§\
cout<<\©»©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¿\} else
cout<<\©»©¥©¥©¥©¥©¥©ß©¥©¥©¥©¥©¥©ß©¥©¥©¥©ß©¥©¥©¥©ß©¥©¥©¥©ß©¥©¥©¥©¥©ß©¥©¥©¥©¥©ß©¥©¥©¿\curnode=p;
cout<<\ÒÔÉÏÊDZ¾´Î²éÕҵĽá¹û£¡\cout<<\
}
//////////////////////////////////////////ɾ³ýº¯ÊýµÄʵÏÖ void student::del_score(int n,string str) {
student *p=curnode,*pw=head;
bool b;
//¶¨Òåi=1£¬µ±ÕÒµ½Êý¾Ýʱ°ÑiÖÃΪ0.ÓÃÓÚÊä³öûÓÐÕÒµ½Êý¾Ý int i=1;
if(!(curnode=head->next))
18
{
cout<<\©³©¥©¥©¥©¥©¥©¥©¥©·\cout<<\©§!ÕâÊÇÒ»¸ö¿Õ±í!©§\cout<<\©»©¥©¥©¥©¥©¥©¥©¥©¿\curnode=p;
cout<<\return;
}
while(curnode!=NULL) {
switch(n) { }
case 1: b=curnode->number==str;break; case 2: b=curnode->name==str;break; default: return;
if(b) { i=0;
pw->next=curnode->next; delete curnode;
curnode=pw->next; } else {
pw=curnode;
curnode=curnode->next;
} }
//µ±i=1ÊÇ´ú±íûÓÐÕÒµ½Êý¾Ý if(i) { } else {
cout<<\©³©¥©¥©¥©¥©¥©¥©¥©·\cout<<\©§ Êý¾Ýɾ³ý³É¹¦ ©§\cout<<\©»©¥©¥©¥©¥©¥©¥©¥©¿\cout<<\©³©¥©¥©¥©¥©¥©¥©¥©·\cout<<\©§Ã»ÓÐÆ¥ÅäµÄÊý¾Ý©§\cout<<\©»©¥©¥©¥©¥©¥©¥©¥©¿\
}
curnode=head;
while(curnode->next)
19

