P
Philipp
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
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