The member function rdbuf() allows several stream objects to read from the same input channel
or to write to the same output channel without garbling the order of the I/O. The use of multiple
stream buffers does not work smoothly, because the I/O operations are buffered. Thus, when using
different streams with different buffers for the same I/O channel, I/O may pass other I/O. An additional
constructor of basic_istream and basic_ostream is used to initialize the stream with a
stream buffer passed as the argument. For example