Derived class linker - is this wrong?
- by bobobobo
We have this situation:
A B
^ ^
| /
C
so
class A { }
class B { }
class C : public A, public B { }
Now, B wants to access a property in C.
How do you do this?
The solution I came up with is to place a pointer in B to an instance of C, which is only active (not null) if this B is in fact a C.