Friday, November 22, 2013

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();

1 Comments:

At November 22, 2013 at 11:01 AM, Blogger jameszhou2000 said...

the header file to include is fstream

this is removed by html

 

Post a Comment

<< Home