Boost logo

Boost Users :

From: Sean Farrow (sean.farrow_at_[hidden])
Date: 2008-06-16 03:44:50


Hi:
Cheers.
That worked.
Sean.

  _____

From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Tan, Tom
(Shanghai)
Sent: 16 June 2008 03:10
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Error when using the split algorithm

>I have the following line of code:

> boost::algorithm::split(SplitString, temp, "-"); I get the
following error when trying >to compile using visual c++ 2005:

>error C2064: term does not evaluate to a function taking 1 arguments
finder.hpp 583

>Can anyone tell me what I have done wrong here.

 

You should be using boost::algorithm::split(SplitString, temp,
is_any_of("-")); the 3rd parameter should be a predicate functor not
string. You need to include <boost/algorithm/string/predicate.hpp> to
use the predefined functor is_any_of().
 
Hope it helps.
Tom

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3189 (20080616) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net