Overriding can happen only when the function of an element of the base class is declared virtual. Overloading can happen only when two functions have different signatures.
None of these conditions apply here. In this case, B::func1just hiding A::func1.
: I, , , . B::func1(int i), , B::func1 A::func1 - ++.
gory: b->func1(), ++ func1 B; B , , b->func1() B::func1(int i). A::func1() B::func1(int i), using A::func1 B, :
class B: public A
{
public:
using A::func1;
int func1(int i)
{
cout << "B func1(" << i << ")\n";
}
};
, .