E
Edith Gross
I should like to have
myclass a=b;
and
myclass a;
a = b;
So I must define a copy constructor AND overload 'operator=' (probably as
a friend. i.e.
friend myclass& operator=(myclass& c1, myclass& c2)
).
The overloaded function returns then c1.
Is all this correct?
TIA,
EG
myclass a=b;
and
myclass a;
a = b;
So I must define a copy constructor AND overload 'operator=' (probably as
a friend. i.e.
friend myclass& operator=(myclass& c1, myclass& c2)
).
The overloaded function returns then c1.
Is all this correct?
TIA,
EG