so when i try to put a letter for number of children for the cin to fail and inform that " number of child must be a number" it shows up for adults as "number of adult must be a number instead.
Ok so in cpp it is very linear, when your code runs it starts at the top and works its way down. So when you enter a letter for either of your tickets inputs it continues to work its way down the page and it hits the first cin.fail statement but the cin.fail statement doesn't know the difference between which ticket input was bad it just knows that a cin statement failed. A solution is that after getting input check it immediately that it's usable then mover on.
Also, I don't know if you know how to use loops yet but if you do it would a much better idea that instead of just testing if the input was bad but if it is bad get new input until you get good input.
If you are going to check if "cin" fails you need to do this after the "cin". The way you have it you have no idea which "cin" failed.
Two things that is missing from your if statements are:
1 2 3 4
// Error message, which you have.
std::cin.clear(); // <--- To clear the state bits of "cin"
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // <--- Requires header file <limits>. Clears the input buffer.
So the if statement at line 31 should come after line 21. And line 41 should move to 24.
Give that a try and see how it works. Once I restart my computer I have a different solution you can try.