车票管理系统毕业课程设计报告 下载本文

}

}

printf(\文件打开错误!\exit(0);

if((fp2=fopen(\车票管理系统0.dat\{ }

fwrite(&class_num,sizeof(int),1,fp2); fwrite(records,sizeof(CLASS),class_num,fp1); fclose(fp1);fclose(fp2);

printf(\文件打开错误!\exit(0);

void load() {

FILE *fp1,*fp2;

if((fp1=fopen(\车票管理系统.dat\{ }

if((fp2=fopen(\车票管理系统0.dat\{ }

29 system(\gotoxy(12,8);

printf(\文件打开错误!\getch(); exit(0);

system(\gotoxy(12,8);

printf(\文件打开错误!\getch(); exit(0);

}

fread(&class_num,sizeof(int),1,fp2); fread(records,sizeof(CLASS),class_num,fp1); fclose(fp1);fclose(fp2);

int whether(int i) { }

void gotoxy(int i,int j) {

HANDLE ( ); }

gotoxy(8,j++);

printf(\请输入起点站:\scanf(\gotoxy(8,j++);

30 struct tm *local; time_t t; t=time(NULL); local=localtime(&t);

if(local->tm_

return 1;

else

return 0;

if((atoi(records[i].)<60&&atoi(records[i].min)>=0))

break;

else { }

gotoxy(8,j++); printf(\输入错误\getch();

}

printf(\请输入终点站:\scanf(\gotoxy(8,j++);

printf(\请输入行车时间:\scanf(\gotoxy(8,j++);

printf(\请输入额定载量:\scanf(\for(;;) {

gotoxy(8,j++);

printf(\请输入已售票数:\if(records[i].now<=records[i].max)

break;

else { }

gotoxy(8,j++); printf(\输入错误!\getch();

}

31