string::pop_back: Build error in DevC++


I'm trying use this hint for delete last character from a text file, but this not compile. I'm get this error => ; based in this document , I'm don't do nothing wrong.

Some hint or solution?

Thank in advance.
You need a more up-to-date compiler for this to work. std::string::pop_back() was added in C++11.
Ok @Peter87, I'm using Codeblocks 12.11 now, but I still get this erro as you can see here =>

How I can solve?
You probably just have to enable C++11 features. I guess you can do it somewhere in the menus by checking some kind of checkbox (they might call it C++0x) or by adding the compiler flag -std=c++11.
I have made exactly as explained above, but appear other error, this => :(
Try -std=c++0x instead.
Also don't worked. Appear the same error :(
We solving this thread we reply other similar query (delete last charactere in file). :D
Last edited on
Not that the 0 in -std=c++0x is a zero and not an O.
I already checked these same two options respectively and nothing work :(

See how I'm doing =>

-std=c++11x =>


-std=c++0x =>

Topic archived. No new replies allowed.