Parameters
- c
- Character to write.
Return Value
The function returns *this.In case of error, the badbit flag is set (which can be checked with member bad). Also, depending on the values set through member exceptions, this may cause an exception of type ios_base::failure to be thrown.
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
This example writes to a file everything the user types until a dot (.) is typed.
Basic template member declaration
(basic_ostream<charT,traits>)| 1 2 |
|
See also
| ostream::write | Write block of data (public member function) |
| ostream::operator<< | Insert data with format (public member function) |
| istream::get | Get unformatted data from stream (public member function) |
