I read that atoi() is deprecated and that it is equivalent to:
(int)strtol(token_start, (char **)NULL, 10);
Does that mean I should use the above instead of atoi(chr) or is it just saying they are equivalent?
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.
It does say on Apple’s Mac OS X Manual Page for atoi(3) (and in the BSD man pages too) that
atoihas been deprecated.I would use the
strtol()equivalent just for that reason, but i doubt you have to worry aboutatoi()being removed.from http://www.codecogs.com/library/computing/c/stdlib.h/atoi.php
Implementation Notes