Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library User's Guide

34.1 Streams as Objects

So far we have used streams as the source or target of input and output operations. But there is another aspect of streams: they are also objects in your C++ program that you might want to copy and pass around like other objects. However, streams cannot simply be copied and assigned. The following chapter shows what you must 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 34.3 explores this option.

If you really want to work with copies of stream buffers, see Section 34.2 for hints and caveats.



Previous fileTop of DocumentContentsIndex pageNext file