Error check for account# starting with any 0 int.

I have to error check if a user inputs any number with a 0 or 00345. The account number cannot begin with any 0 at all and account number needs to be 5 digits long. I am at a loss on how to even begin to do this. Can anyone help?
closed account (DSLq5Di1)
Fetch your input as a string, check the length is 5 and the first character is not 0, convert to an integer using a stringstream if needed..

http://www.cplusplus.com/reference/string/string/
http://www.cplusplus.com/reference/string/getline/
http://www.cplusplus.com/reference/iostream/stringstream/stringstream/
Topic archived. No new replies allowed.