1 / 9
文档名称:

《停车场管理系统源代码》.doc

格式:doc   大小:37KB   页数:9页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

《停车场管理系统源代码》.doc

上传人:我是开始 2020/1/19 文件大小:37 KB

下载得到文件列表

《停车场管理系统源代码》.doc

文档介绍

文档介绍://停车场管理系统#include<>#include<>#defineOVERFLOW0#defineERROR0#defineOK1#defineSTACKSIZE2//车库容量//时间节点typedefstructtime{ inthour; intmin;}Time;//车辆信息typedefstruct{ charCarNum; floattime; intpos_a;//车在停车场中的位置 intpos_b; //车在便道上的位置 intflag;}Car,Car2;//车库信息(顺序栈)typedefstruct{ Car*top; Car*base; intstacksize;}SqStack;//初始化intInitStack(SqStack&S){ =newCar[STACKSIZE]; if(!)exit(OVERFLOW); =; =STACKSIZE; returnOK;}//判空intStackEmpty(SqStackS){ if(==)returnOK; else returnERROR;}//判满intStackFull(SqStackS){ if(->=)returnOK; else returnERROR;}//入栈intPush(SqStack&S,Care){ if(-==)returnERROR; *++=e; returnOK;}//出栈intPop(SqStack&S,Car&e){ if(==)returnERROR; e=*--; returnOK;}//遍历栈intStackTraverse(SqStackS){ Car*p=; Car*q=; intl=1; if(StackEmpty(S)){ for(intj=1;j<=STACKSIZE;j++){ printf("\t车牌:"); printf("\t\t到达时间:"); printf("\t位置%d:空空",j); printf("\n"); } returnOK; } while(p!=q){ Carcar=*(q); printf("\t车牌:%d",); printf("\t\t到达时间:%",); printf("\t\t位置:%d",l++); printf("\n"); q++; } returnOK;}//备用车道(顺序栈)typedefstruct{ Car2*top2; Car2*base2;// intstacksize2;}SqStack2;//初始化intInitStack2(SqStack2&S2){ =newCar2[STACKSIZE]; if(!)exit(OVERFLOW);// =; =STACKSIZE; returnOK;}//判空intStackEmpty2(SqStack2S2){ if(