电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

c++图书管理系统源代码

c++图书管理系统源代码_第1页
1/18
c++图书管理系统源代码_第2页
2/18
c++图书管理系统源代码_第3页
3/18
//本文章来源于网络。 // 图书管理系统.cpp : 定义控制台应用程序的入口点。 // //#include "stdafx.h" #include "iostream" #include "fstream" #include "string.h" #include "iomanip" using namespace std; /*int _tmain(int argc, _TCHAR* argv[]) { return 0; }*/ /*int mark0=0;//用于标记是否找到要找的信息 int mark1=0;//用于标记是否找到要找的信息*/ struct Reathur{//记录书籍的书名信息 char bookname[20];//书名 struct Reathur* Lnode;//指向下一图书节点 }; struct Reader{//记录读者信息 char Readername[20];//读者名称 struct Reathur* next;//指向该读者借的书 struct Reader* Lreader,*Right,*Lift;//下一个读者节点 }; struct Libray{//记录图书的详细信息 char bookname[20];//书名 char bookno[20];//编号 char bookreathur[20];//作者名 int booknum;//现有册数 struct Libray* Llink,* Rlink,*Lnext;//下一图书的左右节点 struct Reader* read;//指向借阅该书的读者 }; void bsinsert(struct Libray* s,struct Libray* &t)//{将 s 所指结点插入到根结点指针为 t 的树中} { if (t==NULL) t=s; else if(strcmp(s->bookname,t->bookname)==1){ bsinsert(s,t->Rlink); } else { bsinsert(s,t->Llink); } } void Rnorder( struct Reader* T){//中序遍历所有的读者链的所有节点 if(T!=NULL){ Rnorder( T->Lift); struct Reathur* u; u=T->next; cout<Readername<<"\n"; while(u!=NULL){ cout<bookname<<"》"<<"\n"; u=u->Lnode; } Rnorder( T->Right); } } ////////////////////////////////////////////////////////// ///////////////按中序遍历遍历二叉排序树进行检索/////////// void Rnorder_name( struct Reader* T,char name[],int &vetex){//中序遍历读者链的所有节点 int i=vetex; if(T!=NULL){ Rnorder_name( T->Lift,name,i); if(strcmp(T->Readername,name)==0){ struct Reathur* u; u=T->next; cout<Readername<<"\n"; while(u!=NULL){ cout<bookname<<"》"<<"\n"; u=u->Lnode; } vetex=1; } Rnorder_name( T->Right,name,i); } }...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

c++图书管理系统源代码

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部