Boost logo

Boost Users :

From: Pavol Droba (droba_at_[hidden])
Date: 2005-12-27 11:08:46


On Sat, Dec 24, 2005 at 09:06:51AM +0200, Alex Vinokur wrote:
>
> "Pavol Droba" <droba_at_[hidden]> wrote in message news:20051223180408.GP15407_at_lenin.felcer.sk...
> > Hi,
> >
> > You might be able to do it using the string_algo find_iterator.
> >
> > #include <boost/algorithm/string.hpp>
> >
> > using namespace std;
> > using namespace boost;
> >
> > ...
> >
> [snip]
> typedef split_iterator<string::iterator> string_find_iterator;
> ------------------------------------------------------------------------------
> > string_find_iterator It=make_find_iterator(str1, token_finder(is_space()));
>
> That line produces the following error message:
>
> error: conversion from `boost::algorithm::find_iterator<__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > > >' to non-scalar type
> `boost::algorithm::split_iterator<__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > > >' requested
>

Sorry, I have fixed one error, but the other line was tied to it.
the second line should be
string_find_iterator It=make_split_iterator(str1, token_finder(is_space()));

Regards,
Pavol


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