S
S
savole2014-11-23 14:47:42
C++ / C#
savole, 2014-11-23 14:47:42

What is writing data to a file in c++?

Very urgently, what is writing data to a file in c ++. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Golubkov, 2014-11-23
@savole

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 question

Ask a Question

731 491 924 answers to any question