cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
string::pop_back: Build error in DevC++
string::pop_back: Build error in DevC++
Jul 24, 2014 at 11:30pm UTC
FLASHCODER
(11)
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.
Jul 25, 2014 at 4:55am UTC
Peter87
(11234)
You need a more up-to-date compiler for this to work. std::string::pop_back() was added in C++11.
Jul 25, 2014 at 3:24pm UTC
FLASHCODER
(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?
Jul 25, 2014 at 4:10pm UTC
Peter87
(11234)
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.
Jul 25, 2014 at 4:53pm UTC
FLASHCODER
(11)
I have made exactly as explained above, but appear other error, this =>
http://prntscr.com/4692d1
:(
Jul 25, 2014 at 6:22pm UTC
Peter87
(11234)
Try -std=c++0x instead.
Jul 25, 2014 at 6:52pm UTC
FLASHCODER
(11)
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
Jul 25, 2014 at 6:57pm UTC
Jul 25, 2014 at 8:48pm UTC
Peter87
(11234)
Not that the 0 in -std=c++0x is a zero and not an O.
Jul 25, 2014 at 9:08pm UTC
FLASHCODER
(11)
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.