<<\计费时间段:\<<\应付费用为:\元\<<\while(s2->top>=0) {
y=carout(s2); carin(s1,y);
}
num=paveout(p); if(num!=0) {
y.num=num;
y.intime=x.intime; carin(s1,y);
cout<<\便道上等候车辆进入停车场。\
<<\车牌号:\<<\车位号:\
<<\ }
//停车场情况 void roomsituation() {
} else {
while(s2->top>-1) {
y=carout(s2); k=carin(s1,y); }
}
cout<<\所查车辆不在停车场中\
}
}
cout<<\
<<\停车场内已有车辆数:\台。\
<<\
//候车便道情况 void roompave() { }
//主程序 void main() {
char order; parking *s1,*s2; pave *p; car x; int k=1; s1=new parking; s2=new parking;
cout<<\请设定停车场的最大容量(大于零的整数):\cin>>Parkingroom;
cout<<\请设置停车场收费标准(大于零的数字,单位:y/h):\cin>>fee;
cout<<\cout<<\功能指令如下(注:区分大小写):\
<<\到达;\<<\离开;\<<\停车场使用情况\<<\候车便道情况\<<\退出程序\
cout<<\
<<\停车场内已有车辆数:\台。\
<<\
cout<<\
}
p=new pave; Init_parking(s1); Init_parking(s2); Init_pave(p); while(k) {
cout<<\请输入功能指令:\cin>>order; cin>>x.num; cin>>x.intime;
switch(order) {
case'A':parkingin(s1,p,x);
break;
case'D':parkingout(s1,s2,p,x);
break;
case'P':roomsituation();
break;
case'W':roompave();
break;
case'E':k=0;cout<<\程序即将退出!\
break;
default:cout<<\您输入的指令有错误,请重新输入。\
}
}
cout<<\程序结束!\