#include <iostream>This library iostream is derived from ostream (for output) and istream for input.
Formatting Formatting of text output is done by inserting manipulators into the output stream.
What is a Manipulator?
It's a function that can alter the characteristics of the output (and input) stream. On the previous page we saw that << was an overloaded function that returned a reference to the calling object e.g. cout for output or cin for input. All manipulators do this so you can include them in the output << or input >>. We'll look at input and >> later on in this lesson.count << endl;endl is a manipulator which ends the line (and starts a new one). It is a function that can also be called in this way.
endl(cout) ;Though in practice you wouldn't do that. You use it like this.
cout << "Some Text" << endl << endl; // Two blank lines
Files are just Streams
Something to bear in mind that with much development these days being done in GUI applications, why would you need text I/O functions? Isn't that just for console applications? Well you will probably do file I/O and you can use them there as well but also what is output to screen usually needs formatting as well. Streams are a very flexible way of handling input and output and can work with- Text I/O. As in console applications.
- Strings. Handy for formatting.
- File I/O.
Manipulators Again
Although we have been using the ostream class, it is a derived class from the ios class which derives from the ios_base. This ancestor class defines the public functions which are manipulators.On the next page List of Functions and Manipulators.

