The Standard C++ iostream library automatically opens the following streams:
Stream |
Meaning |
---|---|
cin |
Standard input |
cout |
Standard output |
cerr |
Standard error output |
clog |
Buffered version of cerr |
wcin |
Wide-character version of cin |
wcout |
Wide-character version of cout |
wcerr |
Wide-character version of cerr |
wclog |
Wide-character version of clog |
By default, the standard streams are used to communicate with the console. However, in environments that support I/O redirection (such as DOS, UNIX, and Windows), the standard streams can be redirected to other devices or files.