+;?}printf("continue(Y/N)(Ntoend)?");?getchar();?scanf("%c",&ch);?}while(ch!='N');?printf("\n");?fclose(fp1);}voidSearchToPlace(){?FILE*fp2;?charnum[20];?charch;?inti=0;?fp2=fopen(".\\train.rec","r+");if(!fp2)?{ printf("Filecannotbeopened\n"); exit(1);?}do?{?rewind(fp2);?printf("输入你要查询的终点.\n>>>");?scanf("%s",num);?while(!feof(fp2))?{ fread(&train[i],sizeof(structTRAIN),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)(Ntoend)?");?getchar();?scanf("%c",&ch);?}while(ch!='N');?printf("\n");?fclose(fp2);}voidSearchFromPlace(){?FILE*fp3;?charnum[20];?charch;?inti=0;?fp3=fopen(".\\train.rec","r+");