c++ - stoi() CodeBlocks not working -


i using codeblocks , can't make stoi() function work. read other questions regarding issue couldn't solve it. checked c+11, using namespace std , have string header. don't know how can solve problem.

error: 'stoi' not declared in scope 

found answer on same question here:

"it seems mingw needs patch: enabling string conversion functions in mingw"

from link can download .zip, follow instructions.

this patch enables following list of c++11 functions , templates in std namespace:

stoi, stol, stoul, stoll, stof, stod, stold, to_string, to_wstring 

attention, maybe haver errors later versions, after using copy/paste:

as conduit said here:

"people should note direct replacement of files not guaranteed safe on versions later mingw gcc 4.7 - use pastebin snippets, open files, , comment/add existing files. applied such, still works fine on mingw gcc 4.8.1 afai"


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -