Hi,
I have a pointer to an ofstream object, and I am trying to use it to write to a file using the << operator, but it wont work. Here is the code I am using:
But it doesnt work. The file has been created but it wont write anything to it. Is there sonething obvious I am doing wrong??Code:// in header file ofstream* logfile; // in cpp file logfile = new ofstream("logfile.txt") *logfile << "logging enabled\n";
Thanks
Mark