Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You include a header file .
You create an object
ofstream Fout;
You open the file
Fout.open("toster.txt");
You write to the file
Fout << "Writing data to a file in C++";
You close the file
Fout.close();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question