In C, why does
strtoul(argv[1])
just doesn’t work? It looks like more parameters are needed but I can’t prevent how long the number will be.
Thanks!
p.s. (argv[1] is properly setted).
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.
Because you’re calling it with the wrong number of arguments. Try
Or if you want to enforce base-10 only:
Be sure you included
<stdlib.h>too!