I'm trying to validate the user inputs. If the user inputs anything but an integer it should stay in the While
loop. But when I give the program a "w" for instance the program just endlessly prints "Please input integer" and I have to stop the program.
int MAns1 = 0
while (!(cin >> MAns1))
{
cout << "\nPlease Enter An Integer: ";
cin.clear();
}