Re: Polymorphic deep copy?


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by Charles Hannum Jr on December 02, 2001 at 21:45:48:

In Reply to: Re: Polymorphic deep copy? posted by William D McQuain on December 02, 2001 at 15:01:42:

: : How do you handle a deep copy of the list of trucks?

: Why is this an issue? You shouldn't be making a copy of that anyway. I can (barely) see a scenario where I'd pass it by const reference, but I can't see copying it under any circumstances.

Because _you_ said, and I loosely quote:

"There are three things you must have if you use dynamic memory: A copy constructor, an assignment operator, and a destructor."

Since my truck depot class uses dynamic memory I was trying to conform to your "words from on high" and got stumped on this part :)


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]