Input and output

how to do it so if pick Tour 1 it shows you what you picked and how to do it so I can use the same name that you get from the GetName();
so it is used in GetMenu()
image

Don’t quite understand what you are after.
How far into the section are you?
However to get a numbered input do the following

int Choice = 0;
while(!(std::cin >> Choice) && Choice < 1 && Choice > 3)
{
    std::cout << "Please input a number between 1 & 3\n";
    std::cin.clear();
    std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
}
std::cin.clear();
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');

That will check that what is entered is a number between 1 & 3, it’s not pretty but it works. Then you would probably want a set if if/else if statements or a switch statement.

I started it by my self without the video
and see if you pick tour 1 it tells you which you choose like if you choose 2 adults it will add it up and so on

also I wanted to so it will say thank you (your Name ueing the string Name )

thank you Dan

So you got it working? :confused:

Privacy & Terms