|
streambuf::setbufvirtual protected member function
streambuf * setbuf ( char * s, streamsize n ); Set buffer This member is called to set a new buffer for the streambuf object. The public member function pubsetbuf calls this protected member function to perform this action.This is a virtual member function that shall be redefined in derived classes to behave as expected by setting the array of n characters pointed by s as the new character buffer. Its default behavior in streambuf is to do nothing and return a reference to the object (this), but it is redefined in both standard derived class, filebuf and stringbuf, to behave as expected specifically for each type of buffer (see filebuf::setbuf and stringbuf::setbuf). Parameters
Return ValueIn case of success, the member function should return the pointer this, otherwise a null pointer.Basic template member declaration( basic_streambuf<charT,traits> )
See also
|