As following source doesn't work with CINT 5.13.91.
Notice: It works with MS C/C++.
Your sincerely
Devinim SOLEN
#include <stdio.h>
class CString
{
public:
CString();
CString(CString& string);
~CString();
private:
void* m_pString;
};
CString::CString()
{
m_pString = new char[255];
printf("1: new string\t: %lu\nthis\t\t: %lu\n", m_pString, this);
}
CString::CString(CString& string)
{
m_pString = new char[255];
printf("2: new string\t: %lu\nthis\t\t: %lu\n", m_pString, this);
}
CString::~CString()
{
printf("3: delete string: %lu\nthis\t\t: %lu\n", m_pString, this);
delete m_pString;
}
void Test(CString string)
{
}
void main()
{
for (int i = 0; i < 3; i++)
Test(CString());
}