"istream" problem

A

Aaron Gray

I need an input stream that can be cloned and assigned.

I need to be able clone the stream, read from the clone, and if that read
was consided "correct input" then to update the original stream to the
cloned stream.

pseudo code:

stringbuf sb( "test input");
istream i( sb);
istream ic( i);

if ( ic.compare("test"))
i = ic;

Can I do a simular thing with C++'s istream or do I need to write my own
istream class ?

Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top