question regarding oop
Moritz
mpipahl at gspgmbh.com
Sun Jun 29 02:17:29 PDT 2008
Thanks a lot to both of you :)
Simen Kjaeraas wrote:
> The exact same way, for one.
>
>
> class Menu
> {
> }
>
> class DerivedMenu : Menu
> {
> }
>
> Menu[GameState] menuArray;
>
> ...
>
> menuArray[currentGameState] = new DerivedMenu();
>
> -- Simen
Jason House wrote:
> Yes. Classes can inherit from another class.
>
> class base{}
> class menuA : public base{}
>
> D allows only one base class, but many interfaces.
More information about the Digitalmars-d-learn
mailing list