How to check if argv (argument vector) contains a char, i.e.: A-Z
Would like to make sure that argv only contains unsigned intergers
For example:
if argv[1] contained '7abc7\0' - ERROR if argv[1] contains '1234\0' - OK
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Additional error checking could be done for a NULL c pointer and an empty string, as desired.
update: (added the missing c++)