The
very documentation[
^] suggests a workaround:
stoi
internally calls
std::strtol(str.c_str(), &ptr, base)
and your code could do exactly the same (you may also call
atoi(str.c_str())
however
strtol
is a superior alternative to
atoi
).
By the way, if you really need
C++11
features, then you have either to update the compiler used by
Dev-C++
or, possibly, enable the
C++11
extensions on the installed compiler (for instance
g++
provides the
-std=c++11
option).
Plese, see this
Stack Overflow
question:
"orwell dev-c++ support c++11"[
^].