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
filebuf
filebuf::filebuf
filebuf::~filebuf
member functions:
filebuf::close
filebuf::is_open
filebuf::open
virtual members:
filebuf::imbue
filebuf::overflow
filebuf::pbackfail
filebuf::seekoff
filebuf::seekpos
filebuf::setbuf
filebuf::showmanyc
filebuf::sync
filebuf::uflow
filebuf::underflow


filebuf::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 array (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 array.

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 internal output array 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_filebuf<charT,traits> )
1
2
typedef traits::int_type int_type;
int_type overflow ( int_type c = traits::eof() );