Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
IOstream Library
manipulators
classes:
filebuf
fstream
ifstream
ios
iostream
ios_base
istream
istringstream
ofstream
ostream
ostringstream
streambuf
stringbuf
stringstream
objects:
cerr
cin
clog
cout
types:
fpos
streamoff
streampos
streamsize
stringbuf
stringbuf::stringbuf
public members:
stringbuf::str
virtual members:
stringbuf::overflow
stringbuf::pbackfail
stringbuf::seekoff
stringbuf::seekpos
stringbuf::setbuf
stringbuf::underflow


stringbuf::overflow

virtual protected member function
int overflow ( int c = EOF );

Write character

Attempts to write c to the current position of the put pointer pptr, and advances that pointer one position forward.

Before proceeding, the function may reallocate and modify the internal output sequence (defined by pbase, pptr and epptr) to make more write positions available. Therefore the function may be successful even if the put pointer was at the end of the internal output sequence.

If c is EOF (or traits::eof() for other traits) no character is written and the put pointer is not advanced, but the function may still modify the output sequence to make more write positions available.

Parameters

c
Character to be written, or EOF (or traits::eof() if no character is to written).

Return Value

A value different than EOF (or traits::eof() for other traits) signals success.
If the function fails, EOF (or traits::eof() for other traits) is returned.

Basic template member declaration

( basic_stringbuf<charT,traits> )
1
2
typedef traits::int_type int_type;
int_type overflow ( int_type c = traits::eof() );