?}while(ch!='N');Р?printf("\n");Р?fclose(fp1);Р}Рvoid SearchToPlace()Р{Р?FILE *fp2;Р?char num[20];Р?char ch;Р?int i=0;Р?fp2=fopen(".\\train.rec","r+");Р if(!fp2)Р?{Р printf("File can not be opened\n");Р exit(1);Р?}Р doР?{Р?rewind(fp2);Р?printf("输入你要查询的终点.\n>>>");Р?scanf("%s",num);Р?while(!feof(fp2))Р?{Р fread(&train[i],sizeof(struct TRAIN),1,fp2);Р if(strcmp(num,train[i].toPlace)==0)Р {Р printf("%-4s%-12s%-8s%-10s%-10s%-8s%.2lf",train[i].trainNum,train[i].date,train[i].fromPlace,train[i].toPlace,Р train[i].inTime,train[i].outTime,train[i].price);Р printf("\n");Р }Р i++;Р?}Р printf("continue(Y/N)(N to end)?");Р getchar();Р scanf("%c",&ch);Р?}while(ch!='N');Р?printf("\n");Р?fclose(fp2);Р}Рvoid SearchFromPlace()Р{Р?FILE *fp3;Р?char num[20];Р?char ch;Р?int i=0;Р?fp3=fopen(".\\train.rec","r+");