hi all,
i'm learning c/c++ right now and was trying to make a "logFile" class. it's far from finished, but i keep getting an error message for one line and i don't understand what it wants. here's my code so far...
when i go to build this, it keeps erroring on the "ofstream itsFile;" line, saying "C2146: syntax error : missing ';' before identifier 'itsFile'".
how do i fix this?
thanks,
glenn
i'm learning c/c++ right now and was trying to make a "logFile" class. it's far from finished, but i keep getting an error message for one line and i don't understand what it wants. here's my code so far...
Code:
#pragma once
class logFile
{
public:
logFile(char*);
~logFile(void);
void write(char*);
void writeln(char*);
private:
ofstream itsFile;
char itsName[30];
};
when i go to build this, it keeps erroring on the "ofstream itsFile;" line, saying "C2146: syntax error : missing ';' before identifier 'itsFile'".
how do i fix this?
thanks,
glenn