Could someone please tell me how to call base class functions from a derived class function with the same name?
This is a discussion on Calling Base Class Functions within the C++ Programming forums, part of the General Programming Boards category; Could someone please tell me how to call base class functions from a derived class function with the same name?...
Could someone please tell me how to call base class functions from a derived class function with the same name?
You need to prefix your declaraiton in the prototype with: virtual.
Did you do that? Maybe you would use the scope resolution operator ::
Yeah.. you need to use the base class name
Code:void Derived::func(int a) { Base::func(a); }
Thank youWill try this.