T
Tony Johansson
Hello!!
If I have part of the assignment operator below.
This statement check the addresses "if (this != &v)" and control so you
haven't assignt to your self.
Could I have checked the actual object like writing if (*this != v) will
that work?
const Array& Array:
perator=(const Array& v)
{
if (this != &v)
{
...
...
}
....
}
many thanks
//Tony
If I have part of the assignment operator below.
This statement check the addresses "if (this != &v)" and control so you
haven't assignt to your self.
Could I have checked the actual object like writing if (*this != v) will
that work?
const Array& Array:
{
if (this != &v)
{
...
...
}
....
}
many thanks
//Tony