https://tehsausage.com/mingw-to-string
Enabling string conversion functions in MinGW
24 August 2012, 11:16 UTC
This patch enables the following list of C++11 functions and templates in the std namespace:
stoi, stol, stoul, stoll, stof, stod, stold, to_string, to_wstring
This assumes you are using the official MinGW distribution.
If you are applying this patch to a version of MinGW GCC later than 4.7, you should examine and apply the patches rather than using the zip file.
Download mingw-to-string-gcc47.zip which contains three patched header files.
(Original patches: wchar.h, stdio.h, os_defines.h)
Copy wchar.h and stdio.h from the include directory in the zip file to the following directory (overwrite):
C:\mingw\include
(replace C:\mingw\ with the appropriate directory)
Copy os_defines.h to the following directory (overwrite):
C:\mingw\lib\gcc\mingw32\4.7.0\include\c++\mingw32\bits
(replace C:\mingw\ with the appropriate directory)
(replace 4.7.0 with the correct version number)