ImageVerifierCode 换一换
格式:DOCX , 页数:22 ,大小:19.31KB ,
资源ID:2437787      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/2437787.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(图书馆管理系统Library management system.docx)为本站会员(b****2)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

图书馆管理系统Library management system.docx

1、图书馆管理系统Library management system图书馆管理系统(Library management system)#包括#包括字符串。”#包括程序。”#包括。H#定义马克斯3typedef struct的书焦book_num 10 ;/图书编号焦book_name 20 ;/图书名称焦book_writer 10 ;/作者国际book_zonggong_;/ /总共册数国际book_zaiguan_;/ /在馆册数下一本书; BK;typedef struct借焦borrow_book_num 10 ;焦huanshu_date 8 ; BW;typedef struct的读

2、者焦reader_num 10 ;焦reader_name 10 ;国际zuida;BW借用最大;下一个读取器结构;路;* h_book BK;路* h_reader;国际menu();/ * * /主菜单无效menu_select_book();无效();/*初始化*/无效init_reader();无效init_book();无效insert_new_book();/ * * /新书入库无效select_book();无效borrow_book();无效return_book();无效save();/ * * /保存信息无效save_reader();无效save_book();无效();

3、无效load_reader();/ * * /加载读者信息无效load_book();无效modify_booklist();无效show_allbook();无效show_reader();无效delete_book();无效()/ * * /初始化 printf(“* n”);printf(“n本系统第一次使用需要对图书信息和读写信息进行初始化n”);init_reader();init_book();无效init_reader() / * * /注册读者信息路* P0;int i;printf(“n现在请对读写信息进行注册n”);P0 =(RD *)malloc(sizeof(RD);h

4、_reader = P0;printf(“请输入读者的信息:n”);printf(“读者图书证号:”);scanf(“%s”,P0 - reader_num);printf(“读者姓名:”);scanf(“%s”,P0 - reader_name);P0 - zuida = 0;为(i = 0;i 借我。borrow_book_num,“0”);/*所借图书直接置为0(即没有借书)* /strcpy(P0 -借我。huanshu_date,“0”);P0 -下= null;printf(“n注册完毕!按任意键继续下一步操作. n”);printf(“* n”);getch();无效init_b

5、ook() / * * /初始化图书信息BKP =(BK *)malloc(sizeof(BK);焦的我;printf(“n现在请对读写信息进行初始化n”);h_book = P;printf(“请输入图书信息:n”);做BKP0 =(BK *)malloc(sizeof(BK);P 下= P0;下一页;printf(“图书编号:”);scanf(“%s”,P0 - book_num);printf(“图书名称:”);scanf(“%s”,P0 - book_name);printf(“图书作者:”);scanf(“%s”,P0 - book_writer);printf(“图书数量:”);s

6、canf(“%d”,与P0 - book_zonggong_);P0-book_zaiguan_=p0-book_zonggong_; / * start in the Museum Library and the total number of equal volumes.P0-next=NULL;Printf (whether to continue input? (y/n) n);Scanf (%s, &i);/p0=p0-next;while (i=y);Printf (n initialization is completed! Press any key to continue t

7、he next operation! n);Printf (*n);Getch ();System (CLS);Void (Save) / * * / save informationSave_Reader ();Save_Book ();Void (Save_Reader) / * * / save the reader informationFILE *fp_reader; / * * / create a file pointerRD *p, *p0;P=h_reader;If (fp_reader=fopen (Reader.txt, WB) =NULL) / * create a f

8、ile, save.Printf (n file failed to save! n, please restart this system. n);Exit (0);While (P! =NULL)If (fwrite (P, sizeof (RD), 1, fp_reader) =1 / *!) readers in the list information written to the file.Printf (n write file failed! n, please restart this system! n);P0=p;P=p-next;Free (P0); / * * / r

9、elease of all nodesH_reader=NULL;Fclose (fp_reader); / * * / close the fileVoid (Save_Book) / * * / save the book informationFILE *fp_book; / * * / create a file pointerBK *p, *p0;P=h_book;If (fp_book=fopen (Book.txt, WB) =NULL) / * create a file, save.Printf (n file failed to save! n, please restar

10、t this system. n);Exit (0);While (P! =NULL)If (fwrite (P, sizeof (BK), 1, fp_book) =1 / *!) will list the information written to the file.Printf (n write file failed! n, please restart this system! n);P0=p;P=p-next;Free (P0);H_book=NULL;Fclose (fp_book);Void (Load) / * * / loading the reader informa

11、tion and Book InformationLoad_Reader ();Load_Book ();Void (Load_Reader) / * * / loading the reader informationRD *p1, *p2, *p3;FILE *fp; / * * / create a file pointerFp=fopen (Reader.txt, RB); / * * / open fileP1= (RD *) malloc (sizeof (RD);FREAD (P1, sizeof (RD), 1, FP);H_reader=p3=p2=p1;While (! F

12、eof (FP) / * read the reader information, Re Chain into the list.p1= (RD *) malloc (sizeof (RD);FREAD (P1, sizeof (RD), 1, FP);P2-next=p1;P3=p2;P2=p1;P3-next=NULL;Free (P1);Fclose (FP); / * * / close the fileVoid (Load_Book) / * * / loading of book informationBK *p1, *p2, *p3;FILE *fp; / * * / creat

13、e a file pointerFp=fopen (Book.txt, RB); / * * / open fileP1= (BK *) malloc (sizeof (BK);FREAD (P1, sizeof (BK), 1, FP);H_book=p3=p2=p1;While (! Feof (FP) / * read information, Re Chain into the list.p1= (BK *) malloc (sizeof (BK);FREAD (P1, sizeof (BK), 1, FP);P2-next=p1;P3=p2;P2=p1;P3-next=NULL;Fr

14、ee (P1);Fclose (FP); / * * / close the file无效insert_new_book() / * * /新进图书BK *,* P1,* P2;P = P2 = h_book;printf(“n不请输入新书信息(包括书号、书名)n”);P1 =(BK *)malloc(sizeof(BK);printf(“不图书编号:”);scanf(“%s”,P1 - book_num);而(strcmp(P1,P2 - - book_num,book_num)!= 0和下一个!= null)下一步;如果(strcmp(P1,P2 - - book_num,book_num)= =

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1