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);
}