copy of stream

From: Philipp (nospam_kitschen_at_hotmail.com)
Date: 09/30/04


Date: Thu, 30 Sep 2004 14:57:35 +0200

Hello,
How can you copy a stream (or change a reference to it)?

Imagine a function which writes "Hello" to a filestream:

void SomeClass::write(ofstream& originalStream){
        ofstream newStream;
        newStream = originalStream; // this does not work
        newStream << "Hello" << endl;
}

How can I make that right? Thanks for your answers Phil



Relevant Pages

  • Re: Streaming Techniques
    ... opposed to performing that same operation on the full file? ... void ReadFileInChunks{ ... using (FileStream fs = new FileStream(file, FileMode.Open, ... I'm guessing the ReadFileAtOnce method works fine as long as there is ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Streaming Techniques
    ... opposed to performing that same operation on the full file? ... void ReadFileInChunks{ ... using (FileStream fs = new FileStream(file, FileMode.Open, ... I'm guessing the ReadFileAtOnce method works fine as long as there is ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: malloc() again
    ... > perfectly safe in all cases I can imagine. ... There is nothing preventing a generic pointer to void from ...
    (comp.lang.c)
  • Re: some post-4.13 observations for future storylines
    ... Given that there is "no time" in the void, I imagine you could pop out ... Remeber - anyone who accuses me of quoting them after I say this, ...
    (rec.arts.drwho)
  • Re: to get values passed to a method as its arguments - how?
    ... void myMethod ... Imagine a city where graffiti wasn't illegal, ...
    (comp.lang.java.programmer)