Hi again :) Thank you both for your replies!
I have tried to use the [code=c] using Base::doSomethi ng; [/code] but I can't get it to solve the problem. The reason I am deriving this class is that it is a precompiled object that has a lot of calls to it, and I want to add some preconditions ( am I right? ) to the Base functions. In other words the Base functions is used as post-condition in the Derived. I have done this with success...
User Profile
Collapse
-
Thank you for your swift reply, Darryl!
Do you know of any case that would make Base::doSomethi ng invisible when overridden even though it is not a virtual func?
I am deriving from a precompiled object and the following example works as expected:
...Code:class Derived : public Base { public: void doSomethingExtra() { //something something... Base::doSomething();Leave a comment:
-
Accessing overridden base methods/functions
Hi!
Given the following example:
...Code:class Base { public: void doSomething() { //Something... } }; class Derived : public Base { public void doSomething() { // Something else... Base::doSomething(); } }; int main() { Derived d; d.doSomething(); return
No activity results to display
Show More
Leave a comment: