streambuf::setbuf [virtual] [protected]
streambuf * setbuf ( char * s, streamsize n );

Set buffer.
  This member is called to set a new buffer for the streambuf-derived object. Its default behavior for this class is just to return this.
  This is a virtual member function that should be redefined in derived classes to behave as expected setting the array of n characters pointed by s as the new character buffer.
  Standard class filebuf redefines this specifically for filebuf objects (filebuf::setbuf).


Pointer to an array of n characters already allocated in memory. If this parameter is NULL the stream shall be unbuffered.
Length in characters of the buffer pointed by s.
This is an integer value of type streamsize

Return Value.
  In case of success the member function should return this, otherwise a null pointer.

Basic template member declaration ( basic_streambuf<charT,traits> ):
typedef charT char_type;
basic_streambuf* setbuf ( char_type* s, streamsize n );

See also.
  pubsetbuf, filebuf::setbuf
  streambuf class

© The C++ Resources Network, 2001