

Talking about the different modes in which you can open a file Ifstream denotes the input file from which the data has to be read.įstream denotes the header file through which we are able to write and read data from the file. Ofstream basically denotes the output file in which the data is to be written. There are namely three data types in this header file and we will be discussing their uses below:

Similarly,to be able to read and write data to a file we have another library to our rescue namely fstream.Here we will be discussing the different data types and functionality which we will be useful to us in writing and reading data from a file. There are libraries through which allow us to read and write data to the standard output.For this purpose we include the iostream header file in our code.

Reading time: 25 minutes | Coding time: 5 minutes
