How to check to ensure you have an integer before calling atoi()?
Asked 2010-10-03T16:23:26.233
14
I wish to take an integer as a command line argument, but if the user passes a non-integer string, this will cause a stack overflow. What is the standard way to ensure atoi() will be successful?