//C++ program to create a file.
using namespace std;
fstream file; //object of fstream class
//opening file "sample.txt" in out(write) mode
cout<<"Error in creating file!!!";
cout<<"File created successfully.";
//closing the file
File created successfully.
total answers (1)
start bookmarking useful questions and collections and save it into your
own study-lists, login now to start creating your own collections.