
The OOP Clone and pure virtual classes.
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- Succinct(Don't listen to me)
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.
Unless you''re doing something I''m missing, the answer should be yes.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement