Why is it crucial to define my own CCTOR ? after all , the compiler supplies a default cctor
for every class who doesn't has a cctor , so why do it in any case ?
The only reason that I've come up with , is a case when I have an object , and I make a duplicate out
of it like :
Class someObject {.....};
someObject * obj1 = new someObject ();
someObject * obj2 = obj1;
delete obj2;
....
// when the code ends , I guess that obj1 would be deleted , and obj2 would point to garbage
Thanks,Ron

New Topic/Question
Reply




MultiQuote




|