Archived

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

Succinct

The OOP Clone and pure virtual classes.

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