Advertisement

The OOP Clone and pure virtual classes.

Started by August 13, 2001 02:00 PM
0 comments, last by Succinct 23 years, 6 months ago
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.

This topic is closed to new replies.

Advertisement