<> wrote in message
news: oups.com...
> I'm thinking that in the copy
> constructor, you are creating a new instance of the class, and in the
> assignment, you have already created the class and therefore have to
> destroy[] before you new. Is this correct?
>
> This is 100% correct. There is nothing to clean up in a copy
> constructor.
>
> The other thing you need to do in an assignment operator (and not in
> any constructor) is to check for self assignment. In the above
> example, if you don't check for this, you will have deleted your data!
>
Yeah, I got that - I omitted that part of the code for the sake of
simplicity. Glad I 'm on the right track