ÄϺ½Í¨Ñ¶Â¼¹ÜÀíϵͳ¡ª¡ªÃæÏò¶ÔÏó³ÌÐòÉè¼ÆC++¿ÎÉ豨¸æ ÁªÏµ¿Í·þ

·¢²¼Ê±¼ä : ÐÇÆÚËÄ ÎÄÕÂÄϺ½Í¨Ñ¶Â¼¹ÜÀíϵͳ¡ª¡ªÃæÏò¶ÔÏó³ÌÐòÉè¼ÆC++¿ÎÉ豨¸æ¸üÐÂÍê±Ï¿ªÊ¼ÔĶÁba9a7f5a55270722192ef7e8

} system(\ infile.close(); }

void book::showC() //ÏÔʾÀàÐÍC {

ifstream infile(\ if (!infile) {

cout<

bool flag = true;

while(infile>>name>>number>>type>>email) { if(type==\ { cout<

void book::show() { char ch1; cout<<\ÄãÏëÊä³öÄÄÒ»ÀàÐÅÏ¢£º\ cout<<\°ì¹«Àà \¸öÈËÀà \ÉÌÎñÀà \ cout<<\ÇëÑ¡Ôñ£º\ cin>>ch1; switch(ch1) { case 'A': showA();

21

break; case 'B': showB(); break; case 'C': showC(); break; default: cout<<\³ö´íÁË£¡\ } }

void book::save() //±£´æ { ifstream in(\ if(!in) { cout<<\¶Ô²»Æð£¡Îļþ´ò¿ªÊ§°Ü£¡\ exit(0); } int n=0; char line[1024]; in.seekg(0L,ios::beg); do { in.getline(line,1024); n++; } while (!in.eof()); in.close(); if (n>15) { cout<<\´æ´¢¿Õ¼äÒÑÂú£¡²»ÄÜÔÙ¼ÈëÊý¾Ý£¡\ } else { ofstream outfile(\ if (!outfile) {

cout <

22

outfile<

outfile.close(); //¹Ø±ÕÎļþ } }

int main() { book d; int choose; int choose1; while(choose=enter()) { switch(choose) { case 1: system(\ while(check()==0) while(choose1=d.enter1()) { switch(choose1) { case 1: d.addPer(); break; case 2: d.delPer(); break; case 3: d.alter(); break; case 4: d.call(); break; case 5: d.show(); break; case 6: d.showall(); break;

23

}

} }

return 0;

case 7: exit(0); default : break; } } break; case 2: login(); break; case 3: exit(0); break; default : break;

Îå¡¢²âÊÔ˵Ã÷

1¡¢µÇ¼½çÃæ

24