samedi 25 juillet 2015

using stoi problems(c++11) [duplicate]

This question already has an answer here:

  • 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://ift.tt/1cZWSeg


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; 
}

Aucun commentaire:

Enregistrer un commentaire