H
hack_tick
hi there
I m having a class A
class A
{
private:
virtual void foo();
};
and class B
class B : public A
{
protected:
void foo();
}
then i reimplement my version of foo
the problem i m facing is, i also require functionality of foo() from the
base class A, if the foo() would have been declared as protected then i
would have been able to access it, but since its private i cannot access it
after inheritance
i would like to do something similar to this
void B::foo()
{
/*my own functionality*/
A::foo();
}
any suggestion ??
I m having a class A
class A
{
private:
virtual void foo();
};
and class B
class B : public A
{
protected:
void foo();
}
then i reimplement my version of foo
the problem i m facing is, i also require functionality of foo() from the
base class A, if the foo() would have been declared as protected then i
would have been able to access it, but since its private i cannot access it
after inheritance
i would like to do something similar to this
void B::foo()
{
/*my own functionality*/
A::foo();
}
any suggestion ??