the op asked for a way to make sure input was a valid int. well input in hex or octal is also a valid int.
A func that takes an int param(not const char* as atoi does, i never said that would work),...