Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
basic_filebuf::overflow
virtual int_type overflow(int_type c = T::eof());
If c != T::eof(), the protected virtual member function endeavors to insert the element T::to_char_type(c) into the output buffer. It can do so in various ways:
- If a write position is available, it can store the element into the write position and increment the next pointer for the output buffer.
- It can make a write position available by allocating new or additional storage for the output buffer.
- It can convert any pending output in the output buffer, followed by
c, by using the file conversion facetfacto callfac.outas needed. Each elementxof type char thus produced is written to the associated stream designated by the file pointerfpas if by successive calls of the formfputc``(x, fp). If any conversion or write fails, the function does not succeed.
If the function cannot succeed, it returns T::eof(). Otherwise, it returns T::not_eof(c).