停车场管理系统php设计,停车场管理系统设计源代码
停车场管理系统设计源代码
附录 源代码1. 头⽂件 Car.h#ifndef CAR#define CAR#include using namespace std;typedef struct Node{void *data;struct Node *link;}nodeS;typedef struct Sta{nodeS *top;int count;}Stack;typedef struct NodeQ{void *dataptr;struct NodeQ
*next;}nodeQ;typedef struct Queues{int count;nodeQ *front;nodeQ *rear;}Que;Stack *Createstack();void* pop(Stack
*stack);void push(Stack *stack,void *data);void DestroyStack(Stack *stack);Que *CreateQueue();void Enqueue(Que
*queue);void *Dequeue(Que *queue);void Destroyqueue(Que *queue);#endif2. 实现⽂件 Car.cpp#include “Car.h“Stack
*Createstack(){Stack *stack;stack = new Stack;if(stack == NULL)return NULL;stack-count = 0;stack-top = NULL;return stack;}void push(Stack *stack,void *data){nodeS *node;node = new nodeS;if(node == NULL || stack == NULL)return ;node-data = data;node-link = stack-top;stack-top = node;stack-count++;
}void* pop(Stack *stack){void *data;nodeS *node;node = new nodeS;if(stack-count == 0)return NULL;data = stack-top-data;node = stack-top;stack-top = node-link;stack-count--
;return data;}void DestroyStack(Stack *stack){nodeS *node;if(stack-count == 0)return ;while(stack-count == 0){delete stack-top-data;node = stack-top;stack-top = node-link;stack-count--;}delete stack;}Que *CreateQueue(){Que *queue;queue = new Que;if(queue == NULL)return NULL;queue-count = 0;queue-front = NULL;queue-rear = NULL;return queue;}void
Enqueue(Que *queue){nodeQ *node;node = new nodeQ;if(node == NULL || queue == NULL)return ;node-next =
NULL;if(queue-count == 0){queue-front = node;}else{queue-rear-next = node;}queue-rear = node;queue-count++;}void
*Dequeue(Que *queue){void *dataptr;if(queue-count == 0)return NULL;dataptr = queue-front-dataptr;if(queue-count ==
1)queue-front = queue-rear = NULL;elsequeue-front = queue-front-next;queue-count--;return dataptr;}void
Destroyqueue(Que *queue){nodeQ *node;if(queue-count == 0)return ;while(queue-count == 0){delete queue-front-php好看主页源码
dataptr;node = queue-front;queue-front = node-next;queue-count--;}delete queue;}3.主⽂件 ThePort.cpp#include
“Car.h“#include #include #include typedef struct InFor{string num;int hour;int min;int sec;int year;int mon;int day;}Infor;int face();int Face();bool Book(Stack *stack,Que *queue,int max);void bookface();time_t compare(Infor *infor);void Display(Infor *infor);time_t arrival(Stack *stack,Infor *infor,Que *queue,int max);void leave(Stack *stack,Que *queue,time_t in);void Getmoney(Infor *infor,int Bianhao,time_t in);void checknum(string num);void InforBook(Stack *stack,Que *queue,int max);int Inforface();void Inforstack();void Inforleave();void Inforqueue(Que *queue);int main(){ofstream
fout(““,ios::trunc);ofstream fout2(““,ios::trunc);bookface();fout.close();fout2.close();return 0;}void bookface(){Stack *stack;Que *queue;stack = Createstack();queue = CreateQueue();int max;bool flag = false;while(max =
face()){if(max 20 || max max;return max;}int Face(){system(“cls“);coutchoose;return choose;}bool Book(Stack *stack,Que *queue,int max){int choose

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。