During its operation, the function will call the protected virtual member function overflow if the put pointer pptr points to the same position as the end pointer epptr before the call (or if it is a null pointer).
Parameters
- c
- Character to be put.
Return Value
In case of success, the character put is returned (type-casted to the appropiate return type).Otherwise, returns EOF (or traits::eof() for other traits).
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Once executed, this example writes any character written to the standard input to a file. This is repeated until a dot character (.) is introduced.
Basic template member declaration
( basic_streambuf<charT,traits> )| 1 2 3 |
|
See also
| streambuf::sbumpc | Get current character and increase get pointer (public member function) |
| streambuf::sgetn | Get sequence of characters (public member function) |
| streambuf::sputn | Write a sequence of characters (public member function) |
