What is the difference between std::atoi() and std::stoi?
1). Are there any other differences between the two? I find std::atoi() a horrible function: It returns zero on error. If you consider zero as a valid input, then you cannot tell whether there was an error during the conversion or the input was zero. That’s just bad. See for example How do I tell if the c … Read more