Re: New kid in the block
class Logger
{
private :
string debugLogFileName ;
/* File streams */
ofstream *debugLogStream ;
/* private constructor to make it singleton */
Logger() ;
static Logger *loggerObj ;
public :
void setDebugLogFileName( string debugLog ) ;
/* Methods for Debug log */
void printDebug( const char *logMessage ) ;
void printInfo( const char *logMessage ) ;
void printError( const char *logMessage ) ;
void closeLog() ;
~Logger() ;
static Logger* instance() ;
};
here I have decleared a startic fuction that i will use to create object.
bhupinder i have read that u cannot declare the constructors in
private.it means the compiler will always give error even when u
declare the constructor in private even if there is no
inheritance.please check if i am correct.
0 Comments:
Post a Comment
<< Home