protected virtual member function

std::filebuf::setbuf

<fstream>
streambuf* setbuf ( char* s, streamsize n);
Set buffer
This member is called to set a new memory buffer for the streambuf object. If both parameters are zero, and no input/output operation has yet taken place on this stream, the stream becomes unbuffered.

The inherited public member function pubsetbuf calls this overriden protected member function to perform this action.

Parameters

s
Pointer to an array of n characters already allocated in memory.
n
Length in characters of the buffer pointed by s.
This is an integer value of type streamsize.

Return Value

The function returns the pointer this.

Basic template member declaration

( basic_filebuf<charT,traits> )
1
2
typedef charT char_type;
basic_streambuf* setbuf ( char_type* s, streamsize n );


See also