P
Peter Cranz
hello,
I've got the following problem:
I have a construct similar like this:
namespace A {
class X {
protected:
virtual void f();
}
}
....
namespace A {
namespace B {
class X : public A:X {
protected:
virtual void f();
}
}
}
at implementation I'd like to call A::X::f() inside A::B::X::f()
I have tried the following (but it doesn't work .. can't get access of
protected element f() inside a::X <- confusing, its the parent ^^) :
namespace A {
namespace B {
X::f() { ...
using A::X;
X::f();
}
}
}
... also I've tried this (but it doesn't work .. it never calls f()
from parent class):
namespace A {
namespace B {
X::f() { ...
X::X::f();
}
}
}
How can I get access to the parental f()-function from inside the
childfunction-f()? I must use these namespaces and also the identical
classnames.
I've got the following problem:
I have a construct similar like this:
namespace A {
class X {
protected:
virtual void f();
}
}
....
namespace A {
namespace B {
class X : public A:X {
protected:
virtual void f();
}
}
}
at implementation I'd like to call A::X::f() inside A::B::X::f()
I have tried the following (but it doesn't work .. can't get access of
protected element f() inside a::X <- confusing, its the parent ^^) :
namespace A {
namespace B {
X::f() { ...
using A::X;
X::f();
}
}
}
... also I've tried this (but it doesn't work .. it never calls f()
from parent class):
namespace A {
namespace B {
X::f() { ...
X::X::f();
}
}
}
How can I get access to the parental f()-function from inside the
childfunction-f()? I must use these namespaces and also the identical
classnames.