John
No. The input stream may well be non-seekable, which means you can't just
reference a position in there. If you tell us what you're trying to do,
there might be further suggestions.
Uli
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
> No. The input stream may well be non-seekable, which means you can't just
reference a position in there.
The input stream I wish to copy will always be seekable.
> If you tell us what you're trying to do, there might be further
suggestions.
I am modifying a language parser. I would like to bury the management of
tellg and seekg into a class.
John
Ah, now it's clear that the "input stream" you mean is the basic_istream type provided in the Standard C++ Library. istream,
ifstream and istrstream are already classes. Note that the iostreams are not part of STL; STL and iostreams are both part of the
Std C++ Lib, though.
I believe that if you use the same string pointer to construct two istrstreams, for instance, you'll get two independently-
traversing stream objects on the same underlying input string.
What do you really need?
Stephan T. Lavavej
Visual C++ Libraries Developer
"Scot T Brennecke" <Sc...@Spamhater.MVPs.org> wrote in message
news:uGZAYbWD...@TK2MSFTNGP04.phx.gbl...
> Note that the iostreams are not part of STL; STL and iostreams are both
part of the Std C++ Lib, though.
I knew that but it completely slipped my mind. What would be a more
appropriate newsgroup for this question?
> What do you really need?
Method rdbuf is what I was looking for.
John
I really meant that to be "FYI". I don't know of a better newsgroup than this one for this type of question.