Hello,
I have got four classes A, B, C and D.
- Class
Ahas a memberbof classB. - Class
Bhas a membercof 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 ?