Avoid Atoi() And Similar Functions C++ c Published: 2005-09-13 Avoid atoi() and related functions: they do not distinguish between invalid input and a valid “0″ string. Use functions which properly report errors, such as strtod().