I am making Railway reservation sys. i want to pass these set of statements into a function how can i do that???? I have used structures in the program...
cout<<"--TICKET SUMMARY--"<<endl;
cout<<"Passenger Name :"<<o2.pass_name<<endl;
cout<<"Age :"<<o2.age<<endl;
cout<<"Sex :"<<o2.sex<<endl;
cout<<"Train Name: "<<o1[x].train_name<<endl;
cout<<"Arrival Time: "<<o1[x].t_arr.hrs<<":"<<o1[x].t_arr.min<<endl;
cout<<"Departure Time: "<<o1[x].t_dep.hrs<<":"<<o1[x].t_dep.min<<endl;
cout<<"Seat Class: 2A"<<endl;
cout<<"Seats Reserved: "<<o2.sts_req<<endl;
cout<<"Seats Left Unreserved:"<<seats_left(o1[x].ac_sts, o2.sts_req)<<endl;
cout<<"Ticket Price: Rs."<<o2.amt<<endl;
plzzz help!!!