Can this be done with multiple inhertance?

Posted by Milo on Stack Overflow See other posts from Stack Overflow or by Milo
Published on 2011-02-11T23:12:51Z Indexed on 2011/02/11 23:25 UTC
Read the original article Hit count: 209

Filed under:
|

Here is what I would like to do.

Say I have Class Widget.

I then create Button from Widget.

I then create ModifiedWidget which re-implements certain functions of Widget.

I then want Button to use ModifiedWidget rather than plain Widget. Is this possible to do some how?

Thanks

class Button : public Widget;

class SuperButton : public Button, public ModifiedWidget;

I'm just not sure if that would do what I want it to though.

© Stack Overflow or respective owner

Related posts about c++

Related posts about multiple-inheritance