Why shouldn’t I use atoi()? [duplicate]

from your own link:

The atoi() function is subsumed by strtol() but is retained because it is used extensively in existing code. If the number is not known to be in range, strtol() should be used because atoi() is not required to perform any error checking.

Or

atoi is obsolete

Leave a Comment