I am making a small vocabulary remembering program where words would would be flashed at me randomly for meanings. I want to use standard C++ library as Bjarne Stroustroup tells us, but I have encountered a seemingly strange problem right out of the gate. I want to change a long integer into std::string so as to be able to store it in a file. I have employed to_string() for the same. The problem is, when I compile it with g++ (version 4.7.0 as mentioned in its --?version flag), it says: PS C:\Users\Anurag\SkyDrive\College\Program\\... g++ -std=c++0x ttd.cpp ttd.cpp: In function 'int main()': ttd.cpp:11:2: error: 'to_string' is not a member of 'std' But, I know it can't be because msdn library clearly says it exists and an earlier question on Stack Overflow (for g++ version 4.5) says that it can be turned on with the -std=c++0x flag. What am I doing wrong? This works for me with g++ 4.6.3. Your error refers to line 11. You say your program has "essentially been reduced to" your code, but does the code you posted also give that error? -- Vaughn Cato Oct 19 at 13:40 @VaughnCato - Yep this is the exact program. I should edit it to make it clearer. Plus, what is that stray int i doing there? -- Anurag Kalia Oct 19 at 14:11 Thank you! I didn't have the courage to point a finger at the mighty g++. Even if I do it in future now (as a last resort), I