文档介绍:#include<fstream>
#include<iostream>
#include<stdli>
#include<ctime>
#include<cmath>
#include<termi>
#include <sstream>
#include<strin>
#include<asser>
//改变字体颜色
#define NONE "\033[m"
#define RED "\033[0;32;31m"
#define GREEN"\033[0;32;32m"
#define BLUE "\033[0;32;34m"
#define YELLOW "\033[1;33m"
#define LIGHT_RED "\033[1;31m"
#define LIGHT_GREEN "\033[1;32m"
#define LIGHT_BLUE"\033[1;34m"
/*
程序导读:
的操作,可通过书名,编号来进行,flag=0按书名来操作,flag=1按书编号来操作
户的操作,也可通过姓名,用户ID号或编号两种方式来进行,flag=0按姓名来操作,
flag=1按用户ID号或编号来操作
个部分,具体已标识如(1)图书管理...
*/
using namespace std;
class Book
{
public:
string book_name;
string book_num;//编号
string book_pre;//出版社
string book_aut;//作者
int book_con;//这样的书还有几本
int book_mux;//这样的书总共有几本
public:
Book(){book_con=0;book_mux=0;}
void show_book();
};
/****************************************(1)图书管理*******************************************/
void Book::show_book()
{
cout<<"书名:"<<book_name<<endl;
cout<<"出版社:"<<book_pre<<endl;
cout<<"此书的作者:"<<book_aut<<endl;
cout<<"ISBN编号:"<<book_num<<endl;
cout<<"此书共有"<<book_mux<<"本"<<endl;
cout<<"还有"<<book_con<<"本书未借出!"<<endl;
}
class BookNode
{
public:
Book book;
BookNode *next;
};
BookNode *headbook=NULL;
class BookManage
{
public:
int totolbook;
public:
BookManage(){totolbook=0;}
void addbook();
void delbook(string s,int num,int flag);
void findbook(string s,int flag);//查询图书
};
void BookManage::addbook()
{
string h;
cout<<"添加输入0,退出输入-1"<<endl;
cin>>h;
if(h=="-1")return;
else if(h=="0")
while(1)
{
if(h=="-1")break;
else if(h=="0")
{
string na,nu,p1,aut;int con;
BookNode *p=new BookNode;
cout<<"请输入书名:"<<endl;
cin>>na;
p->name=na;
cout<<"请输入ISBN编号:"<<endl;
cin>>nu;
p->num=nu;
cout<<"请输入出版社:"<<endl;
cin>>p1;
p->