#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 which is running MinGW GCC 4.7.2. It gives me this error:
What am I doing wrong, I got this from cppreference. Its the exact same code. And its a different error from the one described here.