ͼÊé¹Ý¹ÜÀí³ÌÐò±¨¸æ

³ÌÐòÉè¼Æ×ۺϿγÌÉè¼Æ

cin>>nameb;

cout<<\ÇëÊäÈëÐÂÊé×÷Õߣº\ cin>>authorb; tag1=0;

book.set_bnum(numb); book.set_bname(nameb); book.set_bauthor(authorb); book.set_tag(tag1); bm.add(book);

cout<<\¹§Ï²Äú!ÐÂÊé×ÊÁϼÈë³É¹¦!\ } else

{

cout<<\¶Ô²»Æð,¸ÃÊéºÅ¼Í¼ÒÑ´æÔÚ!ÇëÖØÐÂÊäÈë!\ goto input1;

}

system(\ admin_menu(); }

void reviseBook() //ÐÞ¸ÄÊé¼®º¯Êý

{

char numb[10]; char nameb[20];

char authorb[10];

Book book; int index=-1;

input2: cout<<\ÇëÊäÈëÄúÒªÐÞ¸ÄÊé¼®µÄÊéºÅ:\ cin>>numb;

index=bm.bnu_search(numb); if(index==-1)

47

³ÌÐòÉè¼Æ×ۺϿγÌÉè¼Æ

{

cout<<\¶Ô²»Æð,ÄúÊäÈëµÄÊéºÅ²»´æÔÚ,ÇëÖØÐÂÊäÈë!\

goto input2;

return; }

bool sta=bm.in(index); //ÅжÏÊÇ·ñÔÚ¹Ý if(sta) {

cout<<\¸ÃÊéÄ¿Ç°´¦ÓÚ<ÔÚ¼Ü>״̬,Äú¿ÉÒÔ¼ÌÐø²Ù×÷!\

cout<<\ÇëÊäÈë¸ü¸ÄºóµÄÊéÃû£º\ cin>>nameb;

cout<<\ÇëÊäÈë¸ü¸ÄºóµÄ×÷Õߣº\ cin>>authorb; book.set_bnum(numb); book.set_bname(nameb); book.set_bauthor(authorb); bm.revise(book,index);

cout<<\¹§Ï²Äú!Êé¼®×ÊÁÏÐ޸ijɹ¦!\ else

cout<<\¸ÃÊéÒѱ»½è³ö,ÇëÓÚ¶ÁÕ߹黹ºóÔÙ½øÐÐÏà¹Ø²Ù

×÷!\

system(\admin_menu();

}

void delBook() //ɾ³ýÊé¼®º¯Êý

{

char numb[10];

cout<<\ÇëÊäÈëÄúҪɾ³ýÊé¼®µÄÊéºÅ£º\

cin>>numb;

int index=bm.bnu_search(numb);

48

ÁªÏµ¿Í·þ£º779662525#qq.com(#Ì滻Ϊ@)