class A
{
protected:
void func1() //DO I need to call this virtual?
};
class B
{
protected:
void func1() //and this one as well?
};
class Derived: public A, public B
{
public:
//here define func1 where in the code there is
//if(statement) {B::func1()} else {A::func1()}
};
func1 をどのようにオーバーライドしますか? それとも定義できますか
class Derived: public A, public B
{
public:
void func1()
};
仮想またはオーバーライドなしで?アクセシビリティがわかりません。ありがとうございました。