more. How can I do this.
I had heard that there is a keyword final, in Java which makes it as leaf
class, but dont know what is its equivalent in C++.
for example, make class C as leaf class.
Expand|Select|Wrap|Line Numbers
- class A
- {
- };
- class B: public A
- {
- };
- class C: public B // add something to make C as leaf
- {
- };
- class D: public C // this should give error
- {
- };
Girish.