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