I am trying to verify user input using <cctype>'s isdigit function. As I understand it's use, you pass a char and expect 0 or a non 0 (false/true) return.
Assume the user enters more than one character. I am looking for the best way to ignore everything after the first char. I have been reading about clear and flush and on and on. I am trying to figure out what, if any, is the best way to handle ...for lack of better term... dumb input from the keyboard... There seem to be so many opinions and suggestions, I would like some clarity, perhaps a comparison of different ways to handle input? or maybe a term to google...
thanks : )