Archived

This topic is now archived and is closed to further replies.

The OOP Clone and pure virtual classes.

This topic is 5964 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it possible to implement a Clone method (or some variation) if the base class is has pure virtual methods but concrete data? Thank you for your bandwidth. -- Succinct ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites
To properly clone an object, you would have to do it at the level of the lowest (highest?) derived class, or you wouldn''t know what you were cloning. At that level, all of the pure virtual functions would already be implemented anyway, so it shouldn''t really matter.

Unless you''re doing something I''m missing, the answer should be yes.

Share this post


Link to post
Share on other sites