Home

On Aug 31, 12:45 pm, Sarath <CSar...@gmail.com> wrote:
> I've a doubt on using lexical_cast
>
> suppose if I have a string as follows.
>
> string s( "123 456 789 1011 1213");
>
> Can i separate the each numbers separated by space using lexical_cast?
> I think it's not possible like it. Do we need to manually separate
> each numbers using stringstream or any other parser classes?

I think you are talking about boost::lexical_cast. If you are, you
could use the boost tokenizer (http://www.boost.org/libs/tokenizer/
char_separator.htm)

Thanks and regards
SJ

previous
next

Re: Multiple Overloaded ==
Re: Private Inheritance and Publice Inheritance
Re: Pass by reference or by value?
Re: ming on win32 anyone ? [help a noob]
templated func : what's wrong
Akogo
Fundacja Iskierka
Rodzic Po Ludzku
Kidprotect
Niechciane i Zapomniane