I have a menu in a program I am writing and the user inputs an integer to select from the menu. I am trying to catch any input from the user that is not an integer and have the user select again. I just don't know how to check if the input is a non-integer. For example if the user inputs a character on accident then it should catch it.
Thanks For The helpCode:int sel; cout<<"1: Do This"<<endl; cout<<"2: Do this"<<endl; cout<<"Selection?";cin>>sel;



LinkBack URL
About LinkBacks


