Hello,
I have got four classes A
, B
, C
and D
.
- Class
A
has a memberb
of classB
. - Class
B
has a memberc
of classC
.
A
has a member D* dpointer;
This hierarchy has to be preserved (in fact this is a GUI with app, window, panel as A
, B
and C
).
Now B and C must use a method from *dpointer
.
Is there something more elegant than giving dpointer
as a member of B
and C
? Is it bad ?