My program identifies that a user has entered a letter instead of a number, but it doesn't ask for user input after that. I need to be able to prompt the user to enter another value that is a number and create a loop or something that will check the value every time to make sure it isn't a letter/s.
This is the part of my code that does the check for invalid character:
while (!cin.good())
{
cout << "Error! I only accept numbers! Enter in a number." << endl;
cin.clear();
cin.ignore(numeric_limits<streamsize>::max());
}