This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

rtrimws: can't compile in g++


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]