IO in C++

Input and output functionality is not defined as part of the core C++ language, but is provided through the C++ standard library. When you include the \<iostream> header, you gain access to a whole hierarchy of classes responsible for providing I/O functionality. I/O in C++ is implemented with streams. Abstractly, a stream is a sequence of bytes that can be accessed sequentially. Input streams are used to hold input from a data producer, such as a keyboard, a file, or a network. Output streams are used to hold output for a particular data consumer, such as a monitor, a file, or a printer. 
A standard stream is a pre-connected stream provided to a computer program by its environment. C++ comes with four predefined standard stream objects that have already been set up for your use. 
* cin -- an istream_withassign class tied to the standard input (typically the keyboard)
* cout -- an ostream_withassign class tied to the standard output (typically the monitor)
* cerr -- an ostream_withassign class tied to the standard error (typically the monitor), providing unbuffered output
* clog -- an ostream_withassign class tied to the standard error (typically the monitor), providing buffered output