string::pop_back: Build error in DevC++

Hi,

I'm trying use this hint http://stackoverflow.com/questions/9...-in-a-txt-file for delete last character from a text file, but this not compile. I'm get this error => http://prntscr.com/46149j ; based in this document http://www.cplusplus.com/reference/s...ring/pop_back/ , 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 => http://prntscr.com/46872p

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 => http://prntscr.com/4692d1 :(
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 => http://prntscr.com/46buam

and

-std=c++0x => http://prntscr.com/46bv0s

Topic archived. No new replies allowed.