I am making a project of Railway reservation system. I want to input time of Train arrival and departure as hours and minutes. Now i want both of them to be entered in same line, first hours and then minutes but in same line i.e the cin should not go in second line after i input the hours. Both hours and minutes should be entered in same line without a line break. I am making this program using structures, here's the small code snippet of the project :
for(x=0;x<=1;x++)
{
cout<<"Enter Train Name: ";
cin>>o1[x].train_name;
cout<<"Enter Train No.: ";
cin>>o1[x].t_number;
cout<<"Enter Days of Operation: ";
cin>>o1[x].op_days;
cout<<"Enter Departure Time (HH:Min): ";
cin>>o1[x].t_dep.hrs>>o1[x].t_dep.min;
cout<<"Enter Arrival Time (HH:Min): ";
cin>>o1[x].t_arr.hrs>>o1[x].t_arr.min;
}
Please help how can i Cin two values in same line without a line break after first input stream..???