I am trying to use std::to_string()
, of course with #include <string>
, but the compiler gives me the error that it was not declared in the scope, after lots of searching I have tried the fixes of going to compiler settings and have g++
follow... -std=c++11
,
downloading 4.7 patch header files for wchar.h
, stdio.h
, os_defines.h
and re downloading the latest codeblocks version.
but nothing makes it seem to work.
what settings do I need to change to make this work.
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s=to_string(10);
cout <<s<<endl;
return 0;
}
update: I have re-installed codeblocks,version 13.12 tmd gcc, with gcc version 4.81(tmd-2), I have both -std=c++0 and -std=c++11 flags on in compiler settings, in Toolchain executables i have c++ compiiler:mingw32-gcc-4.8.1.exe, and it Still does not recognize to_string();