I am working to add some simple user input checking into my program; there are three (3) int choices from a menu-- 1, 2, or 3. The user must choose one of these. I am able to check whether or not the input is 1, 2, or 3-- but I am not sure how to go about checking that the input is not possibly (accidently) a float or char. Any other input besides an int causes a failure and an infinite loop. I must prevent this.
I considered the idea of converting all input to int (from float or char) but I have had little sucess with my research with this so far, converting an input value to int from any possible other type (float, char, double, etc.)
Any advice, direction, or resources on this matter would be well appreciated. Thank-you in advance.
sharky_machine