c图书管理系统完整精华排.docxVIP

  • 2
  • 0
  • 约5.61千字
  • 约 8页
  • 2021-04-09 发布于广东
  • 举报
Standardization of sany group #QS8QHH-HHGX8Q8-GNHHJ8-HHMHGN# Standardization of sany group #QS8QHH-HHGX8Q8-GNHHJ8-HHMHGN# c图书管理系统完整精华排 ddbook(n,na,au,n2,da,ti,pr); return 1; } return 0; } Book *query(int bookid) etno()==bookid book[i].gettag()==0) return book[i]; return NULL; } Book *query2(int bookid,char *name) etname(),name)==0) {bookid=book[i].getno(); return book[i]; } return NULL; } Book *query3(int bookid,char *author) etauthor(),author)==0) {bookid=book[i].getno(); return book[i]; } return NULL; } void bookdata(); ettag()==0) book[i].disp(); } ~BDatabase() ettag()==0) ((char *)book[i],sizeof(book[i])); (); } }; void BDatabase::bookdata() { int choice=1; int choice2=1; int choice3=1; int choice4=1; char bname[40]; char bauthor[10]; char bno2[20]; char bdan[20]; char btime[20]; int bprice; int bookid; Book *b; while (choice!=0) { coutendlendl; cout * * * * * * * * * * * *endl; cout * 1 添加信息 *endl; cout * 2 修改信息 *endl; cout * 3 删除信息 *endl; cout * 4 信息查询 *endl; cout * 5 显示信息 *endl; cout * 6 全部删除 *endl; cout * 0 退出 *endl; cout * * * * * * * * * * * *endlendl; coutendl请按键选择您需要的操作:; cin choice; //如果输入的编号在菜单里不存在的情况---在for循环内部如果出现这样的错的时候 while(choice!=1choice!=2choice!=3choice!=4choice!=5choice!=6choice!=0){ coutendl ** 您输入的编号在菜单里不存在,请重新输入 **\aendlendl; cout 请选择您需要的操作:; cinchoice; } switch (choice) { case 1: cout 输入图书编号:; cin bookid; cout 输入图书书名:; cin bname; cout 输入作者名:; cin bauthor; cout 输入分类号:; cinbno2; cout输入出版单位:; cinbdan; cout输入出版时间:; cinbtime; cout输入价格:; cinbprice; addbook(bookid,bname,bauthor,bno2,bdan,btime,bprice); cout图书编号bookid添加成功;按任意键返回菜单 ; break; case 2: co

文档评论(0)

1亿VIP精品文档

相关文档