Omni
Ultra Cool Member
- Reaction score
- 37
I have made myself some class (c++), wich is going to be a sort of garbage collector.
and i've overloaded the = operator to make things work right
the class is named PtrCon
when i do
everything works fine, the pcB.operator= is called
but when i do
it doesnt call pcB.operator=
anyone know why this is?
and i've overloaded the = operator to make things work right
the class is named PtrCon
Code:
PtrCon& operator=(const PtrCon<t> &d)
{
//.....
return *this;
}
when i do
Code:
PtrCon<int> pcA;
PtrCon<int> pcB;
pcB = pcA;
but when i do
Code:
PtrCon<int> pcA;
PtrCon<int> pcB = pcA;
anyone know why this is?