I would like the program to repeat the "how many" question until the input is an integer:
int X = 0;
number_patients:
cout << "how many?\n";
if (! (cin >> X))
{
X = 0;
cout << "please enter a number\n";
cin.clear();
goto number_patients;
}
This creates an infinite loop where the two output phrases are constantly repeated.
My main issue is that i can't get the program to continue after a false "cin"