Top: Streams: Standard input, output and error devices

>     #include <pstreams.h>

>     instm  pin;
>     outstm pout;
>     outstm perr;
>     outstm pnull;

PTypes declares four static stream objects for standard input, output, error and null devices - pin, pout, perr and pnull respectively. These objects can be used in place of the standard C or C++ input/output interfaces. Pnull is an output stream that discards any data written to it. The putf() method in standard output objects pout and perr is atomic with respect to multithreading.

See also: iobase, instm, outstm, Examples

PTypes home