课程设计:停车场c 语言版本数据构造课程设计,规定用栈模仿停车场,用队列模仿便道,实现停车场收费管理系统停车场停满车后车会停在便道上面下面附上源码,vc:(下编译#include //#include //malloc#include //猎取系统时间所用函数 #include //getch()#include //设立光标信息 mallco#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;/*函数声明*/PTime get_time();CarNode getcarInfo();void qingping(int a);