this is my first post.
I read a lot of topics, and seems I've done all right, but I get the above error again when I try to compile the following code :
// Header file
#include <fstream>
#include <ostream>
#include <string>
using namespace std;
class CLogger
{
private:
ostream m_oStream;
public:
CLogger(ostream& oStream);
CLogger(const string sFileName);
};
// Implementation file
CLogger::CLogger(ostream& oStream) :
m_oStream(oStream) // <-- Here is the problem?!
{
}
CLogger::CLogger(const string sFileName) :
m_oStream(ofstream(sFileName.c_str()))
{
}
Could you help me?
Thank you very much!