File handling refers to the process of storing files with the help of programming languages and codes. A stream is a type of concept that describes a device that performs input and output actions. Depending on its use, a stream can be represented as a source or destination of indefinitely long characters. We have a collection of file handling functions in C++. ifstream, ofstream, and fstream are some examples of these streams. These components are developed from fstrembase and its iostream counterpart. These classes, which are used to manage disc files, are declared in fstream. Thus we must include fstream in any application that uses files.