std::basic_ios<CharT,Traits>::rdbuf (3) - Linux Manuals
std::basic_ios<CharT,Traits>::rdbuf: std::basic_ios<CharT,Traits>::rdbuf
NAME
std::basic_ios<CharT,Traits>::rdbuf - std::basic_ios<CharT,Traits>::rdbuf
Synopsis
std::basic_streambuf<CharT, Traits>* rdbuf() const; (1)
std::basic_streambuf<CharT, Traits>* rdbuf( std::basic_streambuf<CharT, Traits>* sb ); (2)
Manages the associated stream buffer.
1) Returns the associated stream buffer. If there is no associated stream buffer, returns a null pointer.
2) Sets the associated stream buffer to sb. The error state is cleared by calling clear(). Returns the associated stream buffer before the operation. If there is no associated stream buffer, returns a null pointer.
Parameters
sb - stream buffer to associate to
Return value
The associated stream buffer, or a null pointer if there was no associated stream buffer.
Exceptions
(none)
Example
// Run this code
Output:
See also
set_rdbuf (protected member function)