C++ write or dump data to external files
#include
using namespace std;
ofstream myfile;
counter++;
myfile.open("c:\\temp\\log.txt");
myfile << "Writing this to a file.\n";
myfile << "total number of frames rendered " << counter << endl;
myfile.close();
using namespace std;
ofstream myfile;
counter++;
myfile.open("c:\\temp\\log.txt");
myfile << "Writing this to a file.\n";
myfile << "total number of frames rendered " << counter << endl;
myfile.close();

1 Comments:
the header file to include is fstream
this is removed by html
Post a Comment
<< Home