Hi all
I have a query regarding inheritance. I want to stop the inheritance chain using C++. What is the mechanism that i should use to stop the inheritance. Assuming that the class will contain the non static data members also.
If you're asking if there is a C++ equivalent of Java's final keyword... there isn't, and I don't know of any way to stop someone from inheriting your class (other than not giving them your header file).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.