t library a={0},b[Max]={0},*p1=NULL,*p2=NULL; //b为结构数组Р?struct borrower c={0};Р?char ch[10]={0},op;Р?int n=0,m=0;Р?FILE *fp1;Р?FILE *fp2;Р?fflush(stdin);Р?if((fp1=fopen("d:\\borrow.txt","a"))==NULL){Р printf("文件打开错误!\n");Р exit(0);Р?}Р if((fp2=fopen("d:\\Library.txt","r"))==NULL){Р printf("文件打开错误!\n");Р exit(0);Р }Р printf("请输入您的姓名: ");Р?scanf("%s",c.uname);Р?printf("请输入租借的书的编号: ");Р?scanf("%s",c.bianhao);Р?printf("请输入租借的日期(年/月/日): ");Р?scanf("%d%c%d%c%d",&c.borrow.year,&c.borrow.ch1 ,&c.borrow.month,&c.borrow.ch2,&c.borrow.day); Р?strcpy(ch,c.bianhao);Р?fprintf(fp1,"%s\t%s\t%d%c%d%c%d ",c.uname ,c.bianhao,c.borrow.year,c.borrow.ch1,c.borrow.month,c.borrow.ch2,c.borrow.day);Р?Р p1=b;Р?while(feof(fp2)==0)Р?{Р fscanf(fp2,"%s%s%d%d%d",p1->bianhao,p1->name,&p1->price,&p1->amount,&p1->shengyu);