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: 212
c++
|multiple-inheritance
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