$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: dejavous_ie_at_[hidden]
Date: 2001-12-03 06:11:08
Mr Bandela,
It works perfectly now. Thank you very much for your help. It is very much appreciated
Regards
Ross Sherlock
--- In boost_at_y..., jbandela_at_u... wrote:
> Sorry, my mistake. 
> punct_space_separator should have been char_delimiters_separator
> 
> Below is a simple test program.  Hope this helps.
> 
> Regards,
> 
> John R. Bandela
> 
> #include <iostream>
> #include <boost/tokenizer.hpp>
> #include <string>
> #include <algorithm>
> #include<iterator>
> 
> 
> int main()  {
>    using namespace boost;
>    using namespace std;
>    string s = "{0 0.23 56 45.456}"  ;
>    char_delimiters_separator<char> sep(false,"{}");
>    tokenizer<> tok(s,sep);
>    copy(tok.begin(),tok.end(),ostream_iterator<string>(cout,"\n"));
>    cin.get();
> }
> 
> 
> 
> Regards,
> 
> John R. Bandela
> 
> --- In boost_at_y..., dejavous_ie_at_y... wrote:
> > Mr Bandela,
> >  Thank you for the help but I cannot get what you suggested to 
> work. When I enter the punct_space_separator<char> sep(false,"()"); 
> line the compiler throws errors saying that this is undeclard and the 
> first use of this function.
> > 
> > Thanks for your time.
> > 
> > --- In boost_at_y..., jbandela_at_u... wrote:
> > > This should work
> > > 
> > > using namespace boost;
> > > string s = "{0 0.23 56 45.456}"
> > > punct_space_separator<char> sep(false,"()");
> > > tokenizer<> tok(s,sep);
> > > 
> > > 
> > > The reason this works is that it overrides the default ispunct to 
> > > pick delimiters.
> > > 
> > > Regards,
> > > 
> > > John R. Bandela