图书先生管理系统voidAppend_book(SqList_B&book){//批量添加图书inti,j,k,pos;charfilename[50];BElemTypee;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,&e.pubday.day);//e.borrownum=e.totalnum;ListInsert_BSq(book,++k,e);}fclose(fp);printf("-----------新添加以下图书-------------\n");Output_Book(book,pos);}elseprintf("没有找到这个文件\n");}
2016/5/18 20:15:30
68KB
系统
1