//停车场管理系统 #include〈stdio
h>#include=S
stacksize) return OK;elsereturn ERROR;}//入栈int Push(SqStack &S,Car e){if(S
base==S
stacksize) return ERROR;*S
top++=e;return OK;} //出栈int Pop(SqStack &S,Car &e){if(S
top==S
base) return ERROR;e=*-—S
top; return OK;} //遍历栈int StackTraverse(SqStack S) {Car *p=S
top; Car *q=S
base;int l=1;if(StackEmpty(S)){for(int j=1;j〈=STACKSIZE;j++){printf(”\t 车牌: ");printf("\t\t 到达时间: ");printf(”\t 位置%d:空空",j);printf(”\n");}return OK; }while(p
=q){Car car=*(q);printf(”\t 车牌: %d”,car
CarNum);printf("\t\t 到达时间:%5
2f",car
time);printf(”\t\t 位置:%d”,l++);printf("\n");q++;}return OK;}//备用车道 (顺序栈)typedef struct {Car2 *top2;Car2 *base2; // int stacksize2;}SqStack2; //初始化 int InitStack2(SqStack2 &S2){S2
base2=new Car2[STACKSIZE];if(
top2) exit(OVERFLOW); //S2
top2=S2