C++ Library - <iostream>



Description

It is used in standard Input / Output Streams Library.

Declaration

Following is the declaration for iosstream function.

C++98

Including this header may automatically include other headers, such as <ios>,
   <streambuf>, <istream>, <ostream> and/or <iosfwd>.

C++11

Including <iostream> automatically includes also <ios>, <streambuf>, <istream>,
   <ostream> and <iosfwd>.

Objects

The objects of iosstream should be like this −

Narrow characters (char)

Sr.No.CharactersDefinition
1cinStandard input stream
2coutStandard output stream
3cerrStandard output stream for errors
4clogStandard output stream for logging

Wide characters (wchar_t)

Sr.No.CharactersDefinition
1wcinStandard input stream (wide)
2wcoutSStandard output stream (wide)
3wcerrStandard output stream for errors (wide-oriented)
4wclogStandard output stream for logging (wide)