C++版圖書管理系統(tǒng)
本文實例為大家分享了C++版圖書管理系統(tǒng)的具體代碼,供大家參考,具體內(nèi)容如下
使用介紹
圖書管理系統(tǒng)源碼由兩部分組成,第一部分book.h頭文件,第二部分book.cpp源文件。復(fù)制代碼時需注意將book.h文件的源碼單獨放在一個一個文件里,文件名必須為book.h。源碼文件也需放在一個單獨的.cpp文件里。
book.h頭文件
#include<iostream> #include<string> #include<stdlib.h> #include<conio.h> using namespace std; //會員類 class VIP { public: ?? ?int vnum;?? ?//會員號 ?? ?string name;?? ?//會員姓名 ?? ?int num;?? ??? ?//圖書編號 ?? ?string bookName; ?//書名 ?? ?string author;?? ?//作者 ?? ?string press;?? ?//出版社 ?? ?VIP *next; ? ?//指針 }; //圖書結(jié)點類 class Node { public: ?? ?int num;?? ??? ?//圖書編號 ?? ?string bookName; ?//書名 ?? ?string author;?? ?//作者 ?? ?string press;?? ?//出版社 ?? ?Node *next;?? ??? ?//指針 }; VIP vip[100]; Node book[100]; void add();?? ?//增加圖書函數(shù) void Output(Node p);?? ?//輸出圖書信息函數(shù) int LookupBook();?? ?//通過書名查找 void LookupAuthor();?? ?//通過作者名查找 int LookupNum();?? ??? ?//通過編號查找 void LookupPress();?? ?//通過出版社查找 void addVIP();?? ??? ?//增加會員函數(shù) void OutputVIP(VIP s);?? ??? ?//輸出會員信息函數(shù) int LookupNumVIP();?? ??? ?//按編號查詢會員 void LookupNameVIP();?? ??? ?//按會員姓名查找會員 void DeleteVIPbook();?? ??? ?//刪除會員借書信息 void Delete();?? ??? ?//刪除會員函數(shù) void Query();?? ??? ?//根據(jù)會員編號查詢借書信息 void Return();?? ??? ?//還書函數(shù) void Borrow();?? ??? ?//圖書借閱函數(shù) void Index();?? ??? ?//首頁 void BookInterface();?? ??? ?//圖書管理界面 void VIPInterface();?? ??? ?//會員管理界面 void DeleteBook();?? ?//刪除圖書函數(shù) void LookupBookIn();?? ?//圖書查詢頁面 void LookupVIPIn();//會員查詢頁面
book.cpp源文件
#include"book.h" ?? ? int main() { ?? ?Index(); ? //首頁函數(shù) ?? ?return 0; } //增加圖書函數(shù) void add() { ?? ?for(int i=0;i<100;i++){ ?? ??? ?if(book[i].num==0){ ?? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入圖書編號:"; ?? ??? ??? ?cin>>book[i].num; ?? ??? ??? ?cout<<endl; ?? ??? ??? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入書名:"; ?? ??? ??? ?cin>>book[i].bookName; ?? ??? ??? ?cout<<endl; ?? ??? ??? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入作者:"; ?? ??? ??? ?cin>>book[i].author; ?? ??? ??? ?cout<<endl; ?? ??? ??? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入出版社:"; ?? ??? ??? ?cin>>book[i].press; ?? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"圖書添加成功"<<"\n"<<endl; ?? ??? ??? ?break; ?? ??? ?} ?? ?} ?? ?return; } //刪除圖書函數(shù) void DeleteBook(){ ?? ?int b=LookupNum(); ?? ?book[b].author='\0'; ?? ?book[b].bookName='\0'; ?? ?book[b].num=0; ?? ?book[b].press='\0'; ?? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"圖書刪除成功"<<endl; } //輸出圖書信息函數(shù) void Output(int b){ ?? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"圖書編號:"<<book[b].num<<" ? ?書名:"<<book[b].bookName<<" ? ?作者:"<<book[b].author<<" ? ?出版社:"<<book[b].press<<"\n"<<endl; } //通過書名查找 int LookupBook(){ ?? ?int j=0; ?? ?string bookname; ?? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入書名:"; ?? ?cin>>bookname; ?? ?for(int i=0;i<100;i++){ ?? ??? ?if(book[i].bookName==bookname){ ?? ??? ??? ?j=1; ?? ??? ??? ?Output(i); ?? ??? ??? ?return i; ?? ??? ?} ?? ?} ?? ?if(j==0){ ?? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"沒有該圖書"<<"\n"<<endl; ?? ?} ?? ?return 1000; } //通過作者名查找 void LookupAuthor(){ ?? ?int j=0; ?? ?string author; ?? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入作者姓名:"; ?? ?cin>>author; ?? ?for(int i=0;i<100;i++){ ?? ??? ?if(book[i].author==author){ ?? ??? ??? ?j=1; ?? ??? ??? ?Output(i); ?? ??? ?} ?? ?} ?? ?if(j==0){ ?? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"沒有該圖書"<<"\n"<<endl; ?? ?} } //通過編號查找 int LookupNum(){ ?? ?int j=0; ?? ?int num; ?? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入圖書編號:"; ?? ?cin>>num; ?? ?for(int i=0;i<100;i++){ ?? ??? ?if(book[i].num==num){ ?? ??? ??? ?j=1; ?? ??? ??? ?Output(i); ?? ??? ??? ?return i; ?? ??? ?} ?? ?} ?? ?if(j==0){ ?? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"沒有該圖書"<<"\n"<<endl; ?? ?} ?? ?return 1000; } //通過出版社查找 void LookupPress(){ ?? ?int j=0; ?? ?string press; ?? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入圖書出版社:"; ?? ?cin>>press; ?? ?for(int i=0;i<100;i++){ ?? ??? ?if(book[i].press==press){ ?? ??? ??? ?j=1; ?? ??? ??? ?Output(i); ?? ??? ??? ?break; ?? ??? ?} ?? ?} ?? ?if(j==0){ ?? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"沒有該圖書"<<"\n"<<endl; ?? ?} } //增加會員函數(shù) void addVIP(){ ?? ?for(int i=0;i<100;i++){ ?? ??? ?if(vip[i].vnum==0){ ?? ??? ??? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入會員編號:"; ?? ??? ??? ?cin>>vip[i].vnum; ?? ??? ??? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入會員名:"; ?? ??? ??? ?cin>>vip[i].name; ?? ??? ??? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"會員添加成功"<<"\n"<<endl; ?? ??? ??? ?break; ?? ??? ?} ?? ?} } //輸出會員信息函數(shù) void OutputVIP(int s){ ?? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"會員編號:"<<vip[s].vnum<<" ? ?會員姓名:"<<vip[s].name<<"\n"<<endl; ?? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"圖書編號:"<<vip[s].num<<" ? ?書名:"<<vip[s].bookName<<" ? ?作者:"<<vip[s].author<<" ? ?出版社:"<<vip[s].press<<endl; } //按編號查詢會員 int LookupNumVIP(){ ?? ?int j=0; ?? ?int num; ?? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入會員編號:"; ?? ?cin>>num; ?? ?for(int i=0;i<100;i++){ ?? ??? ?if(vip[i].vnum==num){ ?? ??? ??? ?OutputVIP(i); ?? ??? ??? ?j=1; ?? ??? ??? ?return i; ?? ??? ?} ?? ?} ?? ?if(j==0){ ?? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"沒有該會員"<<"\n"<<endl; ?? ?} ?? ?return 1000; } //按會員姓名查找會員 void LookupNameVIP(){ ?? ?int j=0; ?? ?string name; ?? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入會員姓名:"; ?? ?cin>>name; ?? ?for(int i=0;i<100;i++){ ?? ??? ?if(vip[i].name==name){ ?? ??? ??? ?j=1; ?? ??? ??? ?OutputVIP(i); ?? ??? ??? ?break; ?? ??? ?} ?? ?} ?? ?if(j==0){ ?? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"沒有該會員"<<"\n"<<endl; ?? ?} } //刪除會員借書信息 void DeleteVIPbook(){ ?? ?int s=LookupNumVIP(); ?? ?vip[s].author='\0'; ?? ?vip[s].bookName='\0'; ?? ?vip[s].num=0; ?? ?vip[s].press='\0'; } //刪除會員函數(shù) void Delete(){ ?? ?int s=LookupNumVIP(); ?? ?vip[s].name='\0'; ?? ?vip[s].vnum=0; ?? ?vip[s].author='\0'; ?? ?vip[s].bookName='\0'; ?? ?vip[s].num=0; ?? ?vip[s].press='\0'; ?? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"會員刪除成功"<<endl; } //根據(jù)會員編號查詢借書信息 void Query(){ ?? ?LookupNumVIP(); } //還書函數(shù) void Return(){ ?? ??? ?DeleteVIPbook(); ?? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"圖書歸還成功"<<"\n"<<endl; } //圖書借閱函數(shù) void Borrow(){ ?? ?int b=LookupBook(); ?? ?int s=LookupNumVIP(); ?? ??? ?vip[s].bookName=book[b].bookName; ?? ??? ?vip[s].author=book[b].author; ?? ??? ?vip[s].num=book[b].num; ?? ??? ?vip[s].press=book[b].press; ?? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"借書成功"<<"\n"<<endl; } //首頁 void Index(){ ?? ?int i; ?? ?system("cls"); ?? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? 圖書管理系統(tǒng) ? ? ? ? ****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ? ? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ?1、圖書管理 ? ? ?2、會員管理 ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<"\n"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請選擇:"; ?? ??? ? ?cin>>i; ?? ??? ? ?switch(i){ ?? ??? ??? ?case 1: ?? ??? ??? ??? ?BookInterface(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 2: ?? ??? ??? ??? ?VIPInterface(); ?? ??? ??? ??? ?break; ?? ??? ??? ?default: ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入1或2"<<"\n"<<endl; ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?Index(); ?? ??? ? ?} } //圖書管理界面 void BookInterface(){ ?? ?system("cls"); ?? ?int i; ?? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<endl; ?? ? ? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ?圖書管理系統(tǒng) ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ?1、增加圖書 ? ? ?2、查詢圖書 ?****"<<endl; ?? ? ? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ?3、圖書借閱 ? ? ?4、圖書歸還 ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ?5、刪除圖書 ? ? ?6、返回首頁 ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<"\n"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請選擇:"; ?? ??? ? ?cin>>i; ?? ??? ? ?switch(i){ ?? ??? ??? ?case 1: ?? ??? ??? ??? ?add();?? ?//增加圖書函數(shù) ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?BookInterface(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 2: ?? ??? ??? ??? ?LookupBookIn();?? ?//圖書查詢頁面 ?? ??? ??? ??? ?break; ?? ??? ??? ?case 3: ?? ??? ??? ??? ?Borrow();?? ??? ?//圖書借閱函數(shù) ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?BookInterface(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 4: ?? ??? ??? ??? ?Return();?? ??? ?//還書函數(shù) ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?BookInterface(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 5: ?? ??? ??? ??? ?DeleteBook();?? ?//刪除圖書函數(shù) ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?BookInterface(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 6: ?? ??? ??? ??? ?Index(); ?? ??? ??? ?default: ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入對應(yīng)編號"<<"\n"<<endl; ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?BookInterface(); ?? ??? ? ?} } //會員管理界面 void VIPInterface(){ ?? ?system("cls"); ?? ?int i; ?? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? 圖書管理系統(tǒng) ? ? ? ? ****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ?1、增加會員 ? ? ?2、查詢會員 ?****"<<endl; ?? ? ? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ?3、借書信息 ? ? ?4、刪除會員 ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ?5、返回首頁 ? ? ? ? ? ****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<"\n"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請選擇:"; ?? ??? ? ?cin>>i; ?? ??? ? ?switch(i){ ?? ??? ??? ?case 1: ?? ??? ??? ??? ?addVIP();?? ??? ?//增加會員函數(shù) ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?VIPInterface(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 2: ?? ??? ??? ??? ?LookupVIPIn(); ?//會員查詢頁面 ?? ??? ??? ??? ?break; ?? ??? ??? ?case 3: ?? ??? ??? ??? ?Query();?? ??? ?//根據(jù)會員編號查詢借書信息 ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?VIPInterface(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 4: ?? ??? ??? ??? ?Delete();?? ??? ?//刪除會員函數(shù) ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?VIPInterface(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 5: ?? ??? ??? ??? ?Index(); ?? ??? ??? ??? ?break; ?? ??? ??? ?default: ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入對應(yīng)編號"<<"\n"<<endl; ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?VIPInterface(); ?? ??? ? ?} } //圖書查詢頁面 void LookupBookIn(){ ?? ?system("cls"); ?? ?int i; ?? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"**************************************************"<<endl; ?? ? ? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? 圖書管理系統(tǒng) ? ? ? ? ? ? ? ****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**************************************************"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ?1、圖書編號查詢 ? ? ?2、書名查詢 ? ? ? ?****"<<endl; ?? ? ? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ?3、圖書作者查詢 ? ? ?4、圖書出版社查詢 ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ?5、返回上一頁 ? ? ? ?6、返回首頁 ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**************************************************"<<"\n"<<endl; ?? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請選擇:"; ?? ??? ? ?cin>>i; ?? ??? ? ?switch(i){ ?? ??? ??? ?case 1: ?? ??? ??? ??? ?LookupNum();?? ?//通過編號查找 ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?LookupBookIn(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 2: ?? ??? ??? ??? ?LookupBook();?? ?//通過書名查找 ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?LookupBookIn(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 3: ?? ??? ??? ??? ?LookupAuthor();?? ?//通過作者名查找 ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?LookupBookIn(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 4: ?? ??? ??? ??? ?LookupPress();?? ?//通過出版社查找 ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?LookupBookIn(); ?? ??? ??? ??? ?break; ?? ??? ??? ?case 5: ?? ??? ??? ??? ?BookInterface();?? ?//圖書管理界面 ?? ??? ??? ??? ?break; ?? ??? ??? ?case 6: ?? ??? ??? ??? ?Index(); ?? ??? ??? ??? ?break; ?? ??? ??? ?default: ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入對應(yīng)編號"<<"\n"<<endl; ?? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ?LookupBookIn(); ?? ??? ? ?} } //會員查詢頁面 void LookupVIPIn(){ ?? ??? ?int i; ?? ??? ?system("cls"); ?? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<endl; ?? ??? ? ? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? 圖書管理系統(tǒng) ? ? ? ? ****"<<endl; ?? ??? ? ? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ?1、通過編號查找會員 ? ? ? ****"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ?2、通過姓名查找會員 ? ? ? ****"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ?3、返回上一頁 ? ? ? ? ? ? ****"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ?4、返回首頁 ? ? ? ? ? ? ? ****"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"****************************************"<<"\n"<<endl; ?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"請選擇:"; ?? ??? ??? ? ?cin>>i; ?? ??? ??? ? ? switch(i){ ?? ??? ??? ??? ??? ?case 1: ?? ??? ??? ??? ??? ??? ?LookupNumVIP();?? ??? ?//按編號查詢會員 ?? ??? ??? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ??? ??? ?LookupVIPIn(); ?? ??? ??? ??? ??? ??? ?break; ?? ??? ??? ??? ??? ?case 2: ?? ??? ??? ??? ??? ??? ?LookupNameVIP();?? ??? ?//按會員姓名查找會員 ?? ??? ??? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ??? ??? ?LookupVIPIn(); ?? ??? ??? ??? ??? ??? ?break; ?? ??? ??? ??? ??? ?case 3: ?? ??? ??? ??? ??? ??? ?VIPInterface();?? ?//會員管理界面 ?? ??? ??? ??? ??? ??? ?break; ?? ??? ??? ??? ??? ?case 4: ?? ??? ??? ??? ??? ??? ?Index(); ?? ??? ??? ??? ??? ??? ?break; ?? ??? ??? ??? ??? ?default: ?? ??? ??? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"<<"請輸入對應(yīng)編號"<<"\n"<<endl; ?? ??? ??? ??? ??? ??? ?cout<<"\n"<<"\t"<<"\t"<<"\t"<<"\t"; ?? ??? ??? ??? ??? ??? ?system("pause"); ?? ??? ??? ??? ??? ??? ?LookupVIPIn(); ?? ??? ? ?} }
以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
C++中用兩個標準容器stack,實現(xiàn)一個隊列的方法詳解
本篇文章是對C++中使用兩個標準容器stack,實現(xiàn)一個隊列的方法進行了詳細的分析介紹,需要的朋友參考下2013-05-05深入探討Linux靜態(tài)庫與動態(tài)庫的詳解(一看就懂)
本篇文章是對Linux靜態(tài)庫與動態(tài)庫進行了詳細的分析介紹,需要的朋友參考下2013-05-05C++ Cartographer源碼中關(guān)于Sensor的數(shù)據(jù)走向深扒
這篇文章主要介紹了C++ Cartographer源碼中關(guān)于Sensor的數(shù)據(jù)走向,整個Cartographer源碼閱讀是很枯燥的, 但絕對是可以學到東西的,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習吧2023-03-03C語言驅(qū)動開發(fā)之內(nèi)核通過PEB獲取進程參數(shù)
PEB結(jié)構(gòu)(Process Envirorment Block Structure)其中文名是進程環(huán)境塊信息。本文將通過PEB實現(xiàn)獲取進程參數(shù),感興趣的小伙伴可以了解一下2022-10-10C++實現(xiàn)softmax函數(shù)的面試經(jīng)驗
這篇文章主要為大家介紹了C++實現(xiàn)softmax函數(shù)的面試經(jīng)驗,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2022-05-05