1
  • I'm using code::blocks IDE. I want to use stoi in my code but always

I take this error :


'stoi' was not declared in this scope I'm using gnu gcc compiler 4.8.1 and i'm using c++11 and I have 64bit computer.


I've checked on the internet and I've made the changes specified on this page: http://tehsausage.com/mingw-to-string


I don't wonna use atoi! but i can't use stoi yet!

#include <iostream>
#include <stdlib.h> 
#include <string> 

using namespace std; 

int main()
{ 
   int temp; 
   string test = "123hello"; 
   temp = stoi(test); 
   cout << temp; 
   return 0; 
}
Scooter
  • 6,802
  • 8
  • 41
  • 64
Ahmadreza
  • 21
  • 3

0 Answers0