电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

停车场管理系统设计源代码

停车场管理系统设计源代码_第1页
1/15
停车场管理系统设计源代码_第2页
2/15
停车场管理系统设计源代码_第3页
3/15
附录 源代码 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); #endif 2. 实现文件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++;...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

停车场管理系统设计源代码

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部