Re: Polymorphic deep copy?


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

Posted by William D McQuain on December 02, 2001 at 15:01:42:

In Reply to: Polymorphic deep copy? posted by Charles Hannum Jr on December 02, 2001 at 11:30:30:

: 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.

: The way you do a deep copy is to copy member fields individually, and this is certainly possible, but the specific type of truck will certainly be lost in the process. Currently, I've just commented the code to that effect but is there a better way?




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 ]