z/OS® XL C++ provides the following predefined streams:
- cin
- The standard input stream
- cout
- The standard output stream
- cerr
- The standard error stream, unit-buffered such that characters
sent to this stream are flushed on each output operation
- clog
- The buffered error stream
All predefined streams are tied to cout. When you use cin, cerr,
or clog, cout gets flushed sending the contents
of cout to the ultimate consumer.
z/OS C standard streams create all I/O to I/O streams:
- Input to cin comes from stdin (unless cin is
redirected)
- cout output goes to stdout (unless cout is
redirected)
- cerr output goes to stderr (unit-buffered)
(unless cerr is redirected)
- clog output goes to stderr (unless clog is
redirected)
When redirecting or intercepting a C standard stream, the corresponding C++ standard
stream becomes redirected. This applies unless you redirect an I/O
stream. See Using C and C++ standard streams and redirection for more information.