Course Object Oriented Programming

Library iostream

Course's Page 15 min Text by
User Image
Allan Garcia

We will now see about our first C++ library: the iostream. We will use it to write and read data.

The iostream

To start, we can open the iostream archive. Right at the beginning, we realized two things:

  • The iostream basically condenses the functionality of two other libraries: istream and ostream.

  • As expected, being a standard library, the namespace used is the std.

Figure 1

Below, we can see that in this library, eight objects are referenced that can be used for input and output.

Figure 2

In this particular class, we will see the first two: the cout, used for output, and the cin, used for input.

The cout