📄 book.h
字号:
//**************************************************************************
// 书类声明
//**************************************************************************
#include <iostream.h>
class book
{
protected: //用于booksale继承
char isbn[51]; //ISBN号
char bookname[51]; //书名
int volumn; //库存量
float retail; //零售价
private:
char author[51]; //作者
char publish[51]; //出版单位
char dateadd[51]; //进书日期
float wholesale; //批发量
public:
void setbookname(char *); //设置ISBN号
void setisbn(char *); //设置书名
void setauthor(char *); //设置作者
void setpublish(char *); //设置出版单位
void setdateadd(char *); //设置进书日期
void setwholesale(float ); //设置批发价
void setretail(float ); //设置零售价
void setvolumn(int n); //设置库存量
char *getbookname(); //获取书名
char *getisbn(); //获取ISBN号
char *getauthor(); //获取作者名
char *getpublish(); //获取出版社名
char *getdateadd(); //获取进书日期
float getwholesale(); //获取批发价
int getvolumn(); //获取库存量
float getretail(); //获取批发价
//重载运算符
friend ostream & operator<<(ostream &,book &);
friend istream & operator>>(istream &,book &);
book & operator =(book &);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -