This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
rtrimws: can't compile in g++
- From: eric <cneric12lin0 at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 6 Jul 2011 22:30:24 -0700 (PDT)
- Subject: rtrimws: can't compile in g++
- Complaints-to: groups-abuse@google.com
- Injection-info: t7g2000vbv.googlegroups.com; posting-host=99.116.255.96; posting-account=aekHSAoAAADeChaoWK7DJgcBoN_eKvLi
- Newsgroups: comp.lang.c++
Dear advanced c++ programers:
I copied and tested a piece simple Trimming string code from book c+
+ cookbook in chapter4, section2
Example 4-4:Trim trailing whitespace. You can download and try it by
yourself.
-------------------------------------------------
http://examples.oreilly.com/9780596007614/
-------------------------------------------------------------------
in my g++ 4.5.2, compiler reponse
--------------------
4-4.cpp: In function ‘void rtrimws(std::string&)’:
4-4.cpp:21:21: error: too many arguments to function ‘void
rtrimws(std::string&)’
4-4.cpp:20:6: note: declared here
------------
according to the book, all book example code is compiled success in
Visual C++ compiler
so, please help
Eric