If both parameters are zero, the object becomes unbuffered.
Parameters
- s
- Pointer to an array of n characters already allocated in memory.
- n
- Length of the character buffer pointed by s, measured in characters.
This is an intergral value of type streamsize.
Return Value
In case of success, the member function should return a pointer to the object (this pointer), otherwise a null pointer.Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
The code in this example sets a new buffer of 512 characters for filestr's strembuf object if the iostream implementation allows for it.
Basic template member declaration
( basic_streambuf<charT,traits> ) |
See also
| streambuf::setbuf | Set buffer (virtual protected member function) |
