Thanku sir...:)
On Mon, Jul 4, 2011 at 1:59 PM, Sandeep Jain wrote:
> This happens because the Derived class's member *hides* the base class's
> member.
> Irrespective of the number/type of parameters.
> The solution to solve this problem is to either add an using declaration in
> the derived cl
This happens because the Derived class's member *hides* the base class's
member.
Irrespective of the number/type of parameters.
The solution to solve this problem is to either add an using declaration in
the derived class.
e.g. *using A::f;*
this will bring f(int) of class A within the scope of cla
class A
{ public:
void g(int i)
{ cout<<"in a";
}
};
class B:public A
{ public:
void f()
{ cout<<"in b";
}
};
int main()
{ B b;
b.f(); //vl call b::f()
b.g(4); //vl call a::g()
}
but
class A
{