Hi!
Is there a way of getting formatted data from a C++ string, apart from=20
sscanf()?
In particular, I would like to get integers from a string.
And since we are here, I would also like to know, whether there is a=20
function to get words from a string (like the << operator for streams)?
Thanks in advance.
--
Greetings,
Bal=E1zs
From: Daniel K. O. <dan...@ya...> - 2004-04-02 23:25:17
OROSZI Balázs wrote:
> Is there a way of getting formatted data from a C++ string, apart from
> sscanf()?
> In particular, I would like to get integers from a string.
> And since we are here, I would also like to know, whether there is a
> function to get words from a string (like the << operator for streams)?
What about stringstreams?
Daniel K. O.
hi,
Am 03 . 04 . 2004 um 00 : 16 hast du folgendes geschrieben:
> Is there a way of getting formatted data from a C++ string, apart from
> sscanf()?
> In particular, I would like to get integers from a string.
As daniel already mentioned stringstream is the thing you want.
> And since we are here, I would also like to know, whether there is a
> function to get words from a string (like the << operator for streams)?
Have a look at www.cppreference.com, there is a full description of the
string class.
greetings
Tim
--
> Und wer als Root browst, gehoert eh | http://we-are-teh-b.org/~tim/borg.key
> in Honig getunkt, in Wollfaeden gewaelzt | http://learn.to/quote
> und im Streichelzoo ausgesetzt... | http://discworld.kicks-ass.org
rockshop auf heise.de
Tim Schumacher wrote:
> Have a look at www.cppreference.com, there is a full description of the
> string class.
Yes, I have been reading those since the beginning of my C++ "career", a=20
really helpful site :)
Thanks for your answers BTW.
--
Greetings,
Bal=E1zs