class A {
public:
void Test(int a) {}
};
class B : public A {
public:
void Test() {}
};
B b;
b.Test( 1 ); // How come this wont work?
[c++] overloadad func from base class
They're not in the same scope, b.A::Test(1); would work.
putting a using A::Test in the second class would also work.
putting a using A::Test in the second class would also work.
class B : public A {
public:
using A::Test;
void Test() {}
};
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement