Disclaimer: Links are to cppreference.com
So I have known for a while that std::atoi has been deprecated and it's been recommended to use std::strtol instead.
C++11 has introduced std::stoi and I'm trying to understand why one would choose to use it over std::strtol
.
From what I understand is that stoi calls strtol but throws exceptions. Also it returns an integer instead of a long.
Are these the main differences, what am I missing?