J
Jonas Huckestein
Hi there,
I was wondering, whether I
can access members of a
derived class from within
it, if I accessed it from a
virtual function on the base
classpointer ^^ Example:
class A {
virtual void oskar(void);
};
class B : A {
void emil(){};
void oskar(void)
{emil();};};
A* peter = new B;
B->oskar();
Is this allowed? I know it
is not possible to call emil
directly, but thiswould be a
fine workaround.
Regards,
Jonas
I was wondering, whether I
can access members of a
derived class from within
it, if I accessed it from a
virtual function on the base
classpointer ^^ Example:
class A {
virtual void oskar(void);
};
class B : A {
void emil(){};
void oskar(void)
{emil();};};
A* peter = new B;
B->oskar();
Is this allowed? I know it
is not possible to call emil
directly, but thiswould be a
fine workaround.
Regards,
Jonas