Go to main content
Oracle® Developer Studio 12.6: C++ User's Guide

Exit Print View

Updated: July 2017

13.5 Assignment of iostreams

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.