[c++] overloadad func from base class

Started by
1 comment, last by zfvesoljc 12 years, 5 months ago

class A {
public:
void Test(int a) {}
};

class B : public A {
public:
void Test() {}
};

B b;
b.Test( 1 ); // How come this wont work?

Advertisement
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.


class B : public A {
public:
using A::Test;
void Test() {}
};
makes sense, thanks

This topic is closed to new replies.

Advertisement