数据结构c语言版课程设计停车场管理系统方案.doc
来源:安防百科 /
时间: 2024-05-28
.
3 / 20
#define MaxSize 5 /*定义停车场栈长度*/
#define PRICE 0.05 /*每车每分钟收费值*/
#define BASEPRICE 0.5 //基础停车费
#define Esc 27 //退出系统
#define Exit 3 //结束对话
#define Stop 1 //停车
#define Drive 2 //取车
int jx=0,jy=32; //全局变量日志打印位置
typedef struct
{int hour;
int minute;
}Time,*PTime; /*时间结点*/
typedef struct /*定义栈元素的类型即车辆信息结点*/
{int num ; /*车牌号*/
Time arrtime; /*到达时刻或离区时刻*/
}CarNode;
typedef struct /*定义栈,模拟停车场*/
{CarNode stack[MaxSize];
int top;
}SqStackCar;
typedef struct node /*定义队列结点的类型*/
{int num; /*车牌号*/
struct node *next;
}QueueNode;
typedef struct /*定义队列,模拟便道*/
{QueueNode *front,*rear;
}LinkQueueCar;