Go to the first, previous, next, last section, table of contents.

Writing on an ostream

These methods write on an ostream (you may also use the operator <<; see section Operators and Default Streams).

Method: ostream& ostream::put (char c)
Write the single character c.

Method: ostream& ostream::write (string, int length)
Write length characters of a string to this ostream, beginning at the pointer string.

string may have any of these types: char*, unsigned char*, signed char*.

Method: ostream& ostream::form (const char *format, ...)
A GNU extension, similar to fprintf(file, format, ...).

format is a printf-style format control string, which is used to format the (variable number of) arguments, printing the result on this ostream. See ostream::vform for a version that uses an argument list rather than a variable number of arguments.

Method: ostream& ostream::vform (const char *format, va_list args)
A GNU extension, similar to vfprintf(file, format, args).

format is a printf-style format control string, which is used to format the argument list args, printing the result on this ostream. See ostream::form for a version that uses a variable number of arguments rather than an argument list.


Go to the first, previous, next, last section, table of contents.