7
pwar
7y

Using atoi(), atof(), atol() in production code. Everywhere.

Comments
  • 0
    @potluck isn't it a good thing? Making sure it's the right data type.
  • 2
    @potluck These functions attempt to convert your string into int, long and float. But they can fail and when that happens you have no way of detecting it. Which is not nice when you are dealing with user inputs that might be unproper. Usually it is recommended to use strtol() as replacement for instance.

    You can find a more detailed explanation here: https://stackoverflow.com/questions...

    (sorry for SO link)
  • 0
    Why does atoi exist then?
Add Comment