fstream new_create1;
new_create1.open("newfilehasopen.txt", ios::out);
In the above example, new_create1 is an object of type fstream, as we know fstream is a class so
we need to create an object of this class to use its member functions. So we create Default Open Modes :
We can combine the different modes using or symbol | .
Example
ofstream new_file;
Comments