Hi,
just a quick question.
if i use a copy constructor in the following way.
A a;
A a1(a)
does it mean that any future updates made in member variable of class A using object 'a',
will also be reflected in a1?
thanks
Printable View
Hi,
just a quick question.
if i use a copy constructor in the following way.
A a;
A a1(a)
does it mean that any future updates made in member variable of class A using object 'a',
will also be reflected in a1?
thanks
It really depends on the copy constructor. But in general no. The copy constructor usually does a copy/clone of the object, it usually does not point to the other object.
Now of course this all depends on what the implementer of the copy constructor did.
Make sense?