iostreams does not allow assignment of one stream to another.
The problem with copying a stream object is that two versions of the state information now exist, such as a pointer to the current write position within an output file, which can be changed independently. Problems could occur as a result.