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();?? ??? ?//首頁(yè)
void BookInterface();?? ??? ?//圖書管理界面
void VIPInterface();?? ??? ?//會(huì)員管理界面
void DeleteBook();?? ?//刪除圖書函數(shù)
void LookupBookIn();?? ?//圖書查詢頁(yè)面
void LookupVIPIn();//會(huì)員查詢頁(yè)面book.cpp源文件
#include"book.h"
?? ?
int main()
{
?? ?Index(); ? //首頁(yè)函數(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;
}
//首頁(yè)
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、返回首頁(yè) ?****"<<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();?? ?//圖書查詢頁(yè)面
?? ??? ??? ??? ?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、返回首頁(yè) ? ? ? ? ? ****"<<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ì)員查詢頁(yè)面
?? ??? ??? ??? ?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();
?? ??? ? ?}
}
//圖書查詢頁(yè)面
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、返回上一頁(yè) ? ? ? ?6、返回首頁(yè) ? ? ? ?****"<<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ì)員查詢頁(yè)面
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、返回上一頁(yè) ? ? ? ? ? ? ****"<<endl;
?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?****"<<endl;
?? ??? ??? ? ?cout<<"\t"<<"\t"<<"\t"<<"\t"<<"**** ? ? ?4、返回首頁(yè) ? ? ? ? ? ? ? ****"<<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++11新特性之右值引用與完美轉(zhuǎn)發(fā)詳解
C++11標(biāo)準(zhǔn)為C++引入右值引用語(yǔ)法的同時(shí),還解決了一個(gè)短板,即使用簡(jiǎn)單的方式即可在函數(shù)模板中實(shí)現(xiàn)參數(shù)的完美轉(zhuǎn)發(fā)。本文就來講講二者的應(yīng)用,需要的可以參考一下2022-09-09
C++控制臺(tái)實(shí)現(xiàn)簡(jiǎn)單人機(jī)對(duì)弈井字棋
這篇文章主要為大家詳細(xì)介紹了C++控制臺(tái)實(shí)現(xiàn)簡(jiǎn)單人機(jī)對(duì)弈井字棋,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-05-05
C語(yǔ)言字符串函數(shù)介紹與模擬實(shí)現(xiàn)詳解
字符串函數(shù)(String?processing?function)也叫字符串處理函數(shù),指的是編程語(yǔ)言中用來進(jìn)行字符串處理的函數(shù),如C,pascal,Visual以及LotusScript中進(jìn)行字符串拷貝,計(jì)算長(zhǎng)度,字符查找等的函數(shù)2022-02-02
淺談C++ Explicit Constructors(顯式構(gòu)造函數(shù))
下面小編就為大家?guī)硪黄獪\談C++ Explicit Constructors(顯式構(gòu)造函數(shù))。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2016-12-12
Objective-C不帶加減號(hào)的方法實(shí)例
顯而易見的事實(shí)是,Objective-C 中,+ 表示類方法,- 表示實(shí)例方法,這篇文章主要給大家介紹了關(guān)于Objective-C不帶加減號(hào)的相關(guān)資料,需要的朋友可以參考下2021-06-06
C++使用GDAL庫(kù)實(shí)現(xiàn)Tiff文件的讀取
這篇文章主要為大家詳細(xì)介紹了C++使用GDAL庫(kù)實(shí)現(xiàn)Tiff文件的讀取的相關(guān)知識(shí),文中的示例代碼講解詳細(xì),感興趣的小伙伴可以跟隨小編一起學(xué)習(xí)一下2023-03-03

