while(loop = 1) // Continues to prompt if amount was inputted incorrectly.
{
switch (class1_days)
{
case 1:
loop = 0;
break;
case 2:
loop = 0;
break;
case 3:
loop = 0;
break;
case 4:
loop = 0;
break;
case 5:
loop = 0;
break;
default:
cout << "The amount you entered is not operable, try again: ";
cin >> class1_days;
break;
}
}
When I run this short bit of code in my script it fails to do anything if any of the cases are chosen, although it does execute the default if one of the cases is not chosen.
TheIdeasMan, the while loop was in place to just continue prompting until a correct number was inputted, once a correct number was inputted, it could go on with the rest of the code. (Hence the loop=0)