Re: Problem with multiple inheritance
Redesign is part of the software development cycle. If you keep moving
forward with a bad design you might end up with a really bad situation
further down the road, which will require more work to fix.
From what you said, containing C would be a better solution than to inherit
from it.
As a matter of fact you can even put a pure virtual method in A that gets a
C* but only implement it in ABC.
AliR.
"No_Name" <no_mail@no_mail.com> wrote in message
news:go17aj$k6s$1@aioe.org...
AliR (VC++ MVP) a exprim? avec pr?cision :
You can turn on RTTI under project property-C/C++-Language-Enable
Run-Time Type Info.
I'm trying to think of a better way to design your classes, but I can't
really give you a good answer without knowing why you have designed them
they way that you have, and why they are not all inhereting from the same
class.
Why is class C a class that doesn't inherite from class A?
AliR.
In fact my class C is basically made of a container (a STL vector) which
allows to store complementary information after an option was selected by
the user. These informations have no significance if the option is not
selected.
In fact, I think I should simply have added a C * pointer to my AB
class, rather than using multiple inheritance. With one simple testing (if
c_pointer == NULL) , I should have known if my object was AB or AB with C
information ...
Alas, I'm afraid it's too late for changing this design, since lot of code
have already been written and cannot be modified ...
Thank you again for your help.