A character is written using the member function sputc(). This character is copied to the
current write position if there is a spare write position. Then the pointer to the current write position
is incremented. If the buffer is full (pptr() == epptr()), the contents of the output buffer are sent
to the corresponding output channel by calling the virtual function overflow(). This function is
responsible for sending the characters to some “external representation,” which may be internal, as in
the case of string streams. The implementation of overflow() in the base class basic_streambuf
returns only end-of-file, which indicates that no more characters could be written.