Answer the question
In order to leave comments, you need to log in
How to solve the problem with multiple inheritance?
There is a base class First containing 1 absolutely virtual function
virtual QString getInfo() =0;
class Basic : virtual public First
class Vip : public Basic, public OtherClass (completely different class, does not belong to this hierarchy)
class SuperVip : public Vip, public Basic
SuperVip* svip = dynamic_cast<SuperVip*>(tmpBasic) //некий указатель на Basic
QString result = svip->Basic::getInfo();
Basic is an ambiguous base of SuperVip
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question