
4 May
2008
4 May
'08
11:04 a.m.
Hi! Jose Martinez schrieb:
The copy constructor would then look like this.
print (const print& p): t(p.t), count(p.count){++d_count;}
Remember: the operator = goes along with the copy constructor. Usually you don't modify the "state" from inside the copy ctor. But here it is only some debug statement. But remember: if you do change the state you should think about the operator = , too.
This matches with what Frank was saying about managing the state of operator()() outside of the object.
Yes. :) Frank