2.9 Streams and Stream Buffers Click on the banner to return to the user guide home page. 2.9 Streams and Stream Buffers So far we have used streams as the source or target of input and output operations. However, streams cannot simply be copied and assigned. The following section shows what you have to do instead.
Stream buffers play a special role.
In numerous cases you will not want to create copies of a stream buffer object, but simply share a stream buffer among streams. Section 2.9.2 explores this option. If you really want to work with copies of stream buffers, see section 2.9.3 for hints and caveats. 2.9.1 Copying and Assigning Stream Objects Stream objects cannot simply be copied and assigned. Let us consider a practical example to see what it means.