cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : IOstream Library : cerr
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forum
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
IOstream Library
manipulators
classes:
· filebuf
· fstream
· ifstream
· ios
· iostream
· ios_base
· istream
· istringstream
· ofstream
· ostream
· ostringstream
· streambuf
· stringbuf
· stringstream
objects:
· cerr
· cin
· clog
· cout
types:
· fpos
· streamoff
· streampos
· streamsize

-

cerr object
extern ostream cerr;

Standard output stream for errors

cerr is an object of class ostream that represents the standard error stream. It is associated with the cstdio stream stderr.

By default, most systems have their standard error output set to the console, where text messages are shown, although this can generally be redirected.

Because cerr is an object of class ostream, we can write characters to it either as formatted data using for example the insertion operator (ostream::operator<<) or as unformatted data using the write member function, among others (see ostream).

See also

ostream Output Stream (class)
cout Standard output stream (object)
clog Standard output stream for logging (object)
cin Standard input stream (object)

© The C++ Resources Network, 2000-2007 - All rights reserved
Spotted an error? - contact us