航空订票系统源代码 c

时间:2012-01-24 04:33:00
【文件属性】:
文件名称:航空订票系统源代码 c
文件大小:46KB
文件格式:RAR
更新时间:2012-01-24 04:33:00
航空订票系统源代码 c 航空订票系统源代码 c #include #include #include #define OK 1 #define TRUE 1 #define FALSE 0 #define ERROR 0 #define OVERFLOW -2 #define PR printf typedef int status; typedef struct airline{ char line_num[8];//航班号 char plane_num[8];//飞机号 char end_place[20];//目的的 int total;//座位总数 int left;//剩余座位 struct airline *next;//下一个结点 }airline; typedef struct customer{ char name[9];//顾客名 char line_num[8];//航班号 int seat_num;//座位号 struct customer *next;//下一个结点 }customer; airline *init_airline(){//初始化链表 airline *l; l=(airline*)malloc(sizeof(airline)); if(l==NULL){ exit(0); } l->next=NULL; return l; } customer * init_customer(){//初始化链表 customer *l; l=(customer*)malloc(sizeof(customer)); if(l==NULL){ exit(0); } l->next=NULL; return l; } status insert_airline(airline **p,char *line_num,char *plane_num,char *end_place,int total,int left){//airline链表插入操作 airline *q; q=(airline*)malloc(sizeof(airline)); strcpy(q->line_num , line_num); strcpy(q->plane_num , plane_num); strcpy(q->end_place , end_place); q->total =total; q->left =left; q->next=NULL; (*p)->next=q; (*p)=(*p)->next; // PR("insert %d ,%dis succssed!\n",e,bl); return OK; } status insert_customer(customer **p,char *name,char *line_num,int seat){//customer链表插入操作 customer *q; q=(customer*)malloc(sizeof(customer)); /* { PR("内存分配失败\n"); return OVERFLOW; }*/ strcpy(q->name , name); strcpy(q->line_num , line_num); q->seat_num =seat; q->next=NULL; (*p)->next=q; ……………………………………
【文件预览】:
航空订票系统源程序
----最后的源程序()
--------航空订票系统.c(13KB)
----测试源程序()
--------航空订票系统.plg(0B)
--------航空订票系统_load_write.c(12KB)
--------test_chang_int.c(455B)
--------test_fwite.c(1KB)
--------航空订票系统load.c(13KB)
--------test_file_read.c(4KB)
--------航空订票系统_load.c(13KB)
--------航空订票系统.c(10KB)
--------test_str_shuZu.c(351B)
--------test_file.c(636B)
--------test_string_shuzu.c(314B)
--------航空订票系统.ncb(25KB)
--------test_main.c(5KB)
--------test_for_i.c(124B)
--------Debug()
--------航空订票系统.dsp(3KB)
--------test_main_new.c(7KB)
航空订票系统
----航空订票系统_load_write.c(12KB)
----test_chang_int.c(455B)
----test_fwite.c(1KB)
----航空订票系统load.c(13KB)
----test_file_read.c(4KB)
----航空订票系统_load.c(13KB)
----航空订票系统.c(10KB)
----test_str_shuZu.c(351B)
----test_file.c(636B)
----test_string_shuzu.c(314B)
----test_main.c(5KB)
----test_for_i.c(124B)
----test_main_new.c(7KB)

网友评论

  • 代码不错,运行调试正常
  • 资源不错,正在研究,我是外行
  • 缺少注释,正在慢慢研读
  • 不错,已经在学习,不过有些代码未注释,不太明白,正在研究中
  • 学习代码语法还是可以的 王图根据他来开发系统好像需要一定的功底
  • 你那个修改航线的密码是多少来着..屌丝智商捉鸡..看不懂啊 就差这个了 总体上还挺好
  • 代码好多没注释,有些看不懂,正在慢慢研究中