You mean accept?
There's no way to force the user to only input a certain thing. They can input whatever they want. What you could do is make them keep inputting until they input an acceptable value. You can do such a thing with a while loop.
test1:
cin>>leaper_toggle;
switch (leaper_toggle)
{
case 1:
standard_year=28;
cout<<"What day (Numeric) within " <<month<< " do you want to use? " <<flush;
cin>>day;
break;
case 2:
leap_year=29;
cout<<"What day (Numeric) within " <<month<< " do you want to use? " <<flush;
cin>>day;
break;
default:
Within this default space if the user inputs a number other than 1 or 2 I can use cout<<you didnt......endl; goto test1: but what if they input a letter...I go into infinite looping.
or should I drop default and create a third case to not accept letters....I dont know....as I look at it it seems default offers a little error checking but it is nit sufficient
default will accept anything other than 1 or 2, I'm not sure about the ascii chart, but what you can do before the switch is make sure the number is valid by using the above methods posted, please read through the links I posted, they will provide you with a multitude of examples, and from that you should be able to figure out what to do.
Otherwise please ask again for more help.
As you have the above code, without validation for leaper_toggle if the user enters a non-numeric char then it will probably crash and I didn't think this is what you wanted.
Can someone tell me how to make program only except digits.