Operator problem with CINT

devinim.solen@tde.alstom.com
Mon, 8 Mar 1999 13:44:32 +0200


Dear CINT users;

When I call function A, CINT doesn't solve the operator CChString(). I compiled
the source with MSC, there is no problem.
Here is the example for the problem;

class CChString
{
public:
CChString();
~CChString();
};

CChString::CChString()
{
}

CChString::~CChString()
{
}

class CString
{
public:
CString();
CString(CString& string);
~CString();

operator CChString() const;

private:
CChString* m_pString;
int m_AutoDelete;
};

CString::CString()
{
m_pString = new CChString;
m_AutoDelete = 1;
}

CString::CString(CString& string)
{
m_pString = string.m_pString;

m_AutoDelete = 0;
}

CString::~CString()
{
if (m_AutoDelete)
delete m_pString;
}

CString::operator CChString() const
{
return *m_pString;
}

void A(CChString string)
{
}

void main()
{
CString string;

A(string);
}