c - Why shouldn't I use atoi()? -


this question has answer here:

someone told me shouldn't use atoi(), , should use strtol() instead. what's wrong atoi() shouldn't use it? strtol() right thing use instead? (and fact strtol() returns long, not int atoi() does?)

from own link:

the atoi() function subsumed strtol() retained because used extensively in existing code. if number not known in range, strtol() should used because atoi() not required perform error checking.

or

atoi obsolete


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -