cout<<"\n Press any key to continue.....!!";
getch();
fout.close();
}
I want to make room numbers with letters
Eg: Example room no. 12A,12B,12C
How do I do it?
If possible can you please edit it in the above given program it self.?
Any help will be greatly appreciated.
Also, how can I include class of travel?
I mean economy,business or first?
your room number is stored in "r" so this will need to be a string to store "12D" for example.
1 2 3
#include<string>
std::string r;
so will room_no, so your class can store the input.
in order to store travel class, you will need another string input similar to seat number, and your class will also need a string variable to hold the input, same as room_no,name,addres,etc...
Also, how can I include class of travel?
I mean economy,business or first?
I'm confused. You prompt for a seat number, then display "The room is booked".
Is this for a hotel or airplane?
If this is for an airplane, you could do the following:
1 2 3 4 5
int row;
char seat;
cout << "Enter row number and seat letter (separated by a space)";
cin >> row >> seat;
PLEASE USE CODE TAGS (the <> formatting button) when posting code. http://v2.cplusplus.com/articles/jEywvCM9/
It makes it easier to read your code and it also makes it easier to respond to your post.