void dingpiao()//承办订票业务子模块 { char no[10];//航班号 int count;//订票量 cout<<"请输入航班号和订票数额:"; cin>>no>>count; int index=findbyno(no); if(index==-1) { cout<<"该航线不存在"<<endl; return ; } if(flight[index].rest>=count)//尚有余票 { Al_Custom *pnew=new Al_Custom; cout<<"请输入您的姓名:"; cin>>pnew->name; cout<<"请输入您要订的舱位等级:"; cin>>pnew->level; pnew->count=count; pnew->next=0; flight[index].rest-=count; pnew->next=flight[index].Al_link->next; flight[index].Al_link->next=pnew; } else//没有余票 { cout<<"该航班的余票额不能满足您的要求,是否排队候补(y/n):"; cout.flush(); char select; do{ select=getch(); }while(select!='y' && select!='n'); if(select=='y')//排队候补 { Wait_Custom *pnew=new Wait_Custom; cout<<endl; cout<<"请输入您的姓名:"; cin>>pnew->name; pnew->count=count; pnew->next=0; flight[index].wait_queue.rear->next=pnew; flight[index].wait_queue.rear=pnew; cout<<flight[index].wait_queue.rear->name<<endl; } else { } } }
void tuipiao()//承办退票业务子模块 { cout<<"请输入您的姓名:"; char name[15]; cin>>name; cout<<"请输入你要退票的航班号与飞行周日:"; int week; char no[10]; cin>>no>>week; bool isfind=false; for(int index=0;index<flight_no;index++) { if(flight[index].week==week && strcmp(flight[index].flight_no,no)==0) { &
首页 上一页 1 2 3 4 5 下一页 尾页 4/5/5