ËÄ¡¢±àÂë
//PASSWORD£ºÃÜÂëµÇ½ //Password.hÎļþµÄÄÚÈÝ£º #include \
#ifndef PASSWORD_H #define PASSWORD_H
int enter(); //µÇÂ¼Ò³Ãæ int check(); //ºË¶ÔÃÜÂë void login(); //×¢²á #endif
//ÎļþPassword.cppµÄÄÚÈÝ: #include
int check() { ifstream infile(\ if(!infile) { cout<
9
cout <
fflush(stdin); //Çå³ý»º´æ int flag=1; string str; while(infile>>user>>code) //¶Á³öÊý¾Ý { getline(infile,str); if((user==sign)&&(code==sign1)) //¼ì²éÓû§Ãû£¬ÃÜÂëÊÇ·ñÕýÈ· { cout< cout< void login() //Óû§×¢²á { system(\ //ÇåÆÁ cout<<\ ÇëÊäÈë¹ÜÀíÔ±×¢²áȨÏÞÃÜÂë:\ string str; str=\ string str1; cin>>str1; if(str1==str) { cout<<\ ͨ¹ýÈÏÖ¤£¡£¡£¡\ cout<<\ Çë´´½¨ÐµÄÓû§Ãû£º\ cin>>user; fflush(stdin); cout<<\ ÇëÊäÈëÃÜÂ룺\ cin>>code; fflush(stdin); 10 cout<<\ ÇëÖØÐÂÊäÈëÃÜÂ룺\ cin>>code1; while(code!=code1) //±È½ÏÁ½´ÎÊäÈëµÄÃÜÂë { cout<<\ ´´½¨Ê§°Ü£¡\ cout<<\ ÇëÖØÐÂÊäÈëÃÜÂë:\ cin>>code1; } cout<<\ ´´½¨³É¹¦£¡\ ofstream outfile(\ //ÒÔ×·¼Óģʽ´ò¿ªÎļþ if(!outfile) { cout< int enter( ) //µÇÂ¼Ò³Ãæ { system(\ //ÇåÆÁ system(\ //±³¾°Óë×ÖÌåÑÕÉ« cout< <<\ <<\ ͨ Ѷ ¼ µÇ ¼ ϵ ͳ \ <<\ 1. µÇ ¼ \ <<\ 2. ×¢ ²á \ 11 <<\ 0. ÍË ³ö \ <<\ <<\ Ñ¡Ôñ£º\ int choose; cin>>choose; fflush(stdin); return choose; } //ͨÐż¹ÜÀíϵͳ_xxxxxxxx.cppÎļþµÄÄÚÈÝ #include class book { public: book(); //¹¹Ô캯Êý int enter1(); //¹ÜÀíÊ×Ò³ void addPer(); //Ìí¼ÓÁªÏµÈË void delPer(); //ɾ³ýÁªÏµÈË void alter(); //ÐÞ¸ÄÐÅÏ¢ void call(); //²¦ºÅ void showall(); //ÏÔʾËùÓÐÁªÏµÈ˵ÄÐÅÏ¢ void save(); //±£´æ void show(); //ÏÔʾ²éѯµÄÀàÐÍ void showA(); //ÏÔʾÀàÐÍA void showB(); //ÏÔʾÀàÐÍB void showC(); //ÏÔʾÀàÐÍC private: string name; //ÐÕÃû string number; //µç»° string type; //ÀàÐÍ string email; 12