数据结构图书管理系统
图书学生管理系统 void Append_book(SqList_B &book) {//批量添加图书 int i,j,k,pos; char filename[50]; BElemType e; FILE *fp; printf("\t\t----------新添一批图书------------\n"); printf("\t请输入新书文件全名:"); gets(filename); fp=fopen(filename,"r"); if(fp) { k=book.length; pos=k+1; while(!feof(fp)) {fscanf(fp,"%s %s %s %s %d %d %d %d %d",e.bookno,e.bookname,e.author, e.publisher,&e.totalnum,&e.borrownum,&e.pubday.year,&e.pubday.month,&a mp;e.pubday.day); //e.borrownum=e.totalnum; ListInsert_BSq(book,++k,e); } fclose(fp); printf("-----------新添加以下图书-------------\n"); Output_Book(book,pos); } else printf("没有找到这个文件\n"); } mp;e.pubday.day); //e.borrownum=e.totalnum; ListInsert_BSq(book,++k,e); } fclose(fp); printf("-----------新添加以下图书-------------\n"); Output_Book(book,pos); } else printf("没有找到这个文件\n"); }
文件列表
Application_1.rar
(预估有个22文件)
Application_1
append_book.txt
2KB
append_stu.txt
2KB
.dep.inc
144B
borrow.txt
534B
student1.txt
8KB
dist
Debug
MinGW-Windows
application_1.exe
83KB
暂无评论