![]() |
Prevent subclass from overriding method
Hi,
Is there a way to prevent subclasses from overriding a method in the base class? Essentially, is there an equivalent of a final method like in Java? |
No.
It, however, possible to prevent any derivation from a class which, in turn, prevents overriding of any member functions (aka methods). |
You might want to look into "c++ Polymorphism".
|
Quote:
|
Mr. Sroustrup speaks. See here.
|
Have a look here -
http://www.parashift.com/c++-faq-lit....html#faq-23.9 |
| All times are GMT -5. The time now is 1:56 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC