回 帖 发 新 帖 刷新版面

主题:在线跪求c语言编写的民航售票系统的源代码!!!

请大家帮帮忙啊十分的感谢!!!

回复列表 (共1个回复)

沙发

include "string.h"
#include "stdio.h"
#define MAX_SEAT 3
#define DATE 2
typedef struct accrossport{
                           char port[10];
                           struct accrossport *next;
                           }accrossport;

typedef struct airlinedata{
                           char airlinenumber[10];
                           char begin_port[10];
                           char end_port[10];
                           char takeoff_time[6];
                           char arrive_time[6];
                           int guest_max;
                           accrossport *port;
                           float flyingtime;
                           int selled_seated[DATE][MAX_SEAT];
                           int flyday[DATE];
                           float ticket_price;
                           int selled[DATE];
                           struct airlinedata *next_info;
                           float profit[DATE];
                           int tuipiao[DATE];
                           }t_info;
void t_save(t_info *p,FILE *fp)
{
int i;
while(p)
{
  fprintf(fp,"%s",p->;airlinenumber);
  fprintf(fp,"%s",p->;begin_port);
  fprintf(fp,"%s",p->;end_port);
  fprintf(fp,"%s",p->;takeoff_time);
  fprintf(fp,"%s",p->;arrive_time);
  fprintf(fp,"%d",p->;guest_max);
/* while(p->;port) */
  /* fprintf(fp,"%s",p->;port); */
  /* fprintf(fp,"%f",p->;flyingtime);  */
  for(i=0;i<DATE;i++)
    fprintf(fp,"%d",p->;flyday[i]);
  for(i=0;i<DATE;i++)
    fprintf(fp,"%d",p->;tuipiao[i]);
  for(i=0;i<DATE;i++)
    fprintf(fp,"%d",p->;selled[i]);
  /* fprintf(fp,"%f",p->;ticket_price);*/
  p=p->;next_info;
  fprintf(fp,"\r\n");}
fclose(fp);
return;
}


我来回复

您尚未登录,请登录后再回复。点此登录或注册