#ifndef __LOGFILE__H__ #define __LOGFILE__H__ /* ** Include fstream header */ #ifndef _FSTREAM_ #include using namespace std; #endif class CLogFile { public: void PrintCurTime(); CLogFile(); CLogFile(char* tszFileName); ~CLogFile(); CLogFile& operator <<(long lVal); CLogFile& operator <<(const TCHAR* str); CLogFile& operator <<(TCHAR tch); CLogFile& operator <<(int nVal); CLogFile& operator <<(unsigned long ulVal); CLogFile& operator <<(double dVal); CLogFile& operator <<(unsigned int unVal); CLogFile& operator <<(unsigned __int64 unllVal); void LOGERROR(TCHAR* formatString, ...); private: ofstream *m_cOutFile; void Output( const TCHAR* data); }; #endif // __LOGFILE__H__