|
ios::rdbufpublic member function
streambuf* rdbuf ( ) const; streambuf* rdbuf ( streambuf* sb ); Get/set the associated stream buffer The first syntax returns the stream buffer object associated with the stream.The second syntax associates the stream with sb and returns the stream buffer object previously associated with the stream. In this case, the buffer's control state is set to goodbit as if a call to member clear(). Parameters
Return ValueA pointer to the stream buffer object associated with the stream before the call.Example
This example uses both function syntaxes to first get a pointer to a file's streambuf object and later assigns it to cout. Basic template member declaration( basic_ios<charT,traits> )
See also
|