Streams and Files:-
Streams is a general term. It refers to flow of data from a source to a destination. The process of inputting data from the source is known as reading extracting, getting or fetching. The process of outputting data to the destination is known as writing, inserting, putting or storing.In C++ special classes known as stream classes are used to handle data streams. These classes are called stream classes. Stream classes are defined in header files and these are included in the program through their header files. The objects of stream classes are used to control flow of data.
For example in C++ programs we commonly include the header file “iostream”. This header file contains the objects “cin”, “cout”, “cerr”, and “clog”. These objects are used to move streams of data across various parts of the computer.
Following are the most commonly used C++ streams classes.