This function is expected either to modify the pbase, pptr and epptr pointers that define the internal output array in such a way that room is made available for more characters, or otherwise fail. It is also responsibility of the function to write the character passed as argument.
The specific behavior depends on each derived class, but it normally attempts to write some of the characters to the controlled output sequence to make room for more characters in the internal output array. Its default behavior in streambuf is to do nothing and return EOF (or traits::eof() for other traits), although it is overloaded in
This protected member function is automatically called by sputc and sputn member functions when overflows happen.
Parameters
- c
- Character to be written.
Return Value
A value different than EOF (or traits::eof() for other traits) signals success.If the function fails, either EOF (or traits::eof() for other traits) is returned or an exception is thrown.
Basic template member declaration
( basic_streambuf<charT,traits> )| 1 2 |
|
See also.
| streambuf::sputc | Store character at current put position and increase put pointer (public member function) |
| streambuf::sputn | Write a sequence of characters (public member function) |
