#include <iostream> #include <string> int main() { std::string test = "45"; int myint = stoi(test); std::cout << myint << '\n'; }
I tried this code on my computer that works with MinGW GCC 4.7.2. This gives me this error:

What am I doing wrong, I got this from cppreference . Its exact code. And this is another mistake from the one described here .
c ++ mingw
Games brainiac
source share