void searchbook()//查询函数 { FILE *fp; int choose; int ttid=0,tid=0,tamount=0,n=0,k=0,i,l; char tname[20]= {'\0'},ttauthor[20]= {'\0'},tauthor[20]= {'\0'},ttpublishing[20]= {'\0'},tpublishing[20]= {'\0'}, deletebookname[20]= {'\0'}; if ((fp=fopen("library.txt","r"))==NULL)//打开文件 { system ("cls"); printf("\n\n\n\n\n\n\n\n\n\t\t\t记录文件不存在,请按任意键返回。"); getch(); booksystem(); }   l=stockcount();//获得库存文件中图书个数   choose=searchmenu(); fflush(stdin); while (1) { switch(choose)//功能函数选择 { case 1: system ("cls"); printf("\n"); printf("请输入编号:"); scanf("%d",&ttid); break; case 2: system ("cls"); printf("\n"); printf("请输入书名:"); scanf("%s",deletebookname); break; case 3: system ("cls"); printf("\n"); printf("请输入作者:"); scanf("%s",ttauthor); break; case 4: system ("cls"); printf("\n"); printf("请输入出版社:"); scanf("%s",ttpublishing); break; case 5: booksystem(); break; default: printf("您的输入有误,请重新输入。\n"); getch(); booksystem(); break; } break; } system ("cls"); for (i=0; i