is there a keyword (or a way) to define a function such that it cannot be redefined in its child classes???
what I mean is like this:
class Upper {
...
public:
int foo(int a);
....
}
class Lower: public Upper {
....
}
i.e class Lower is a child of Upper, I want it so that function foo cannot be redefined in class Lower (and also other child classes)
TIA
what I mean is like this:
class Upper {
...
public:
int foo(int a);
....
}
class Lower: public Upper {
....
}
i.e class Lower is a child of Upper, I want it so that function foo cannot be redefined in class Lower (and also other child classes)
TIA