datastruct_define.h

来自「用MFC做的航空售票系统」· C头文件 代码 · 共 64 行

H
64
字号
#include "malloc.h"
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
#define NULL 0
/******************************************************************************/
/*日期数据结构定义*/
typedef struct date
{
  int year;
  int month;
  int day;
  int hour;
  int min;
  int week;
}Date;
/*****************************************************************************/

/*****************************************************************************/
/*排队等票数据结构定义*/
typedef struct waitcheck
{  char name[20];/*排队乘客姓名*/
   int  wnum;/*排队订票量*/
   struct waitcheck *next;
}wnode,*pwaitcheck;
/*****************************************************************************/

/*****************************************************************************/
/*排队等票链队定义*/
typedef struct queue
{  pwaitcheck front;
   pwaitcheck rear;
}linkqueue;
/*****************************************************************************/


/*****************************************************************************/
/*票链表定义*/
typedef struct bookcheck
{  char name[10];/*客户姓名*/
   int bnum;/*订票量*/
   int sticketclass;/*舱位等级*/
   struct bookcheck *next;
}linklist;
/*****************************************************************************/


/*****************************************************************************/
/*航线信息数据结构定义*/
struct flightinf
{   char fendname[50];/*终点站名*/
    char fltno[50];/*航班号*/
    char pno[50];/*飞机号*/
    char day;/*飞行周日*/
    int passengersum;/*乘员定额 */
    int fchecknum;/*余票量 */
    linklist *order;/*指向乘员名单链表的头指针*/
    linkqueue wait;/*候补的头和尾*/
};struct flightinf *start;
/*****************************************************************************/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?