航空订票系统php,航空订票系统

[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;

}

[源代码打包下载]

7ab7b94785bbdb79d4aaa6009386543f.gif航空订票系统.rar(50积分)[19 次下载]

694748ed64b9390909c0d88230893790.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值