Original Post
hello everyone,
I don''t understand this problem. The compiler reports an error, but I can''t fix it. Basically, in the header file, I include the line "ofstream logFile"
I need my log file to output to a file. But I keep getting the following error. Any ideas anyone? I can''t see the problem!
Any suggestions much appreciated,
- Thankyou in advance, kind reagrds
#pragma once
#include <string.h>
...
class CLog
{
public:
CLog();
~CLog(void);
.... // the usual stuff
private:
....
ofstream logFile; <--- error message refers to this line
};
This is the error message:
c:\demo\Log.h(48): error C2079: ''CLog::logFile'' uses undefined class ''std::basic_ofstream<_Elem,_Traits>''
with
[
_Elem=char,
_Traits=std::char_traits
]