instead of moving on when you enter a number it repeats all that is in the do while loop and when you enter any thing but a number get a never ending loop that constantly repeats.
Yep, people know about that issue. std::cin (cin in this code with no std::) you can use as a bool, which is false if you enter the wrong data type (I'm a bit fuzzy on this, it's a bit more complicated, but using it as a bool which is true if everything went to plan and false otherwise should do the job.)
after every cin request, put the following 2 lines of code
1 2
std::cin.clear();
std::cin.ignore();
or maybe its vice-versa, not on my Pc so I can't double check it with my code, but with those 2 lines in the right order, whatever the right order is, entering the wrong data type forces you to reenter it