In a derived class If I redefine/overload a function name from a Base class,
then those overloaded functions are not accessable/visible to derived class.
Why is this??
If we don't overload the oveloaded function from the base class in derived class
then all the overloaded versions of that function are available to derived class
objects, why is this??
what is the reason behind this. If you explain this in compiler and linker level
that will be more helpful to me. is it not possible to support this kind of scinario??
Edited For examble: class B { public: int f() {} int f(string s) {} }; class D : public B { public: int f(int) {} }; int main() { D d; d.f(1); //d.f(string); //hidden for D } Now object 'd' can't access f() and f(string).See Question&Answers more detail:os