欢迎来到天天文库
浏览记录
ID:14408072
大小:63.50 KB
页数:28页
时间:2018-07-28
《c++图书馆续(people类及相关人员类)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、C++图书馆续(people类及相关人员类)//people类#ifndefHEADER_PEOPLE#defineHEADER_PEOPLE#include#include#include#include"Book.h"usingnamespacestd;externBook*books;classPeople{public:stringID;//用户名stringPassword;//登入密码stringName;//真实姓名stringSex;//性别public:People();//无参构造函数voidSearchBook();
2、//按图书号查找voidSearchBook(stringcontent);//重载search函数voidLook_allBook();//查看所有馆藏图书};#endif#include"People.h"#include"Book.h"externBook*books;People::People(){}voidPeople::Look_allBook(){cout<<"以下为所有馆藏图书信息:";cout<3、<"作者";cout<bno);cout<bname);cout<author);cout<press);cout<4、storenum);cout<borrownum)<<"";b=b->next;}while(b!=0);}voidPeople::SearchBook(){stringcontent;stringchoice;Book*b;do{system("cls");cout<<"***图书查找***";intjudge=0;cout<<"输入查找关键字:";cin>>content;b=books;while(b!=0){if(b->bno==content5、6、b->bname==c7、ontent){cout<bno);cout<bname);cout<8、(9)<author);cout<press);cout<storenum);cout<borrownum)<<"";judge=1;}b=b->next;}if(judge==0)cout<<"没有相关图书的搜索结果...";cout<<"继续查询?";cout<<"继续请输入Y或y,其他任意键返回上层.";cin>>choice;}while(choice=="y"9、10、cho11、ice=="Y");}voidPeople::SearchBook(stringcontent){intjudge=0;Book*b;b=books;do{if(b->bno==content){cout<
3、<"作者";cout<bno);cout<bname);cout<author);cout<press);cout<
4、storenum);cout<borrownum)<<"";b=b->next;}while(b!=0);}voidPeople::SearchBook(){stringcontent;stringchoice;Book*b;do{system("cls");cout<<"***图书查找***";intjudge=0;cout<<"输入查找关键字:";cin>>content;b=books;while(b!=0){if(b->bno==content
5、
6、b->bname==c
7、ontent){cout<bno);cout<bname);cout<8、(9)<author);cout<press);cout<storenum);cout<borrownum)<<"";judge=1;}b=b->next;}if(judge==0)cout<<"没有相关图书的搜索结果...";cout<<"继续查询?";cout<<"继续请输入Y或y,其他任意键返回上层.";cin>>choice;}while(choice=="y"9、10、cho11、ice=="Y");}voidPeople::SearchBook(stringcontent){intjudge=0;Book*b;b=books;do{if(b->bno==content){cout<
8、(9)<author);cout<press);cout<storenum);cout<borrownum)<<"";judge=1;}b=b->next;}if(judge==0)cout<<"没有相关图书的搜索结果...";cout<<"继续查询?";cout<<"继续请输入Y或y,其他任意键返回上层.";cin>>choice;}while(choice=="y"
9、
10、cho
11、ice=="Y");}voidPeople::SearchBook(stringcontent){intjudge=0;Book*b;b=books;do{if(b->bno==content){cout<
此文档下载收益归作者所有