cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : IOstream Library : cout
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
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

-

cout object
extern ostream cout;

Standard output stream

cout is an object of class ostream that represents the standard output stream. It corresponds to the cstdio stream stdout.

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

Because cout 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)
cin Standard input stream (object)
cerr Standard output stream for errors (object)
clog Standard output stream for logging (object)

 

Home page | Privacy policy
© cplusplus.com, 2000-2009 - All rights reserved - v2.2.1
Spotted an error? contact us