Your inheritance diagram looks something like this:
Concrete
|
D
/ \
C B
/ \
A A
When you try to convert your Concrete*
into an A*
, the compiler has no idea which instance of A
you want. Do you want to convert to the A
that C
derives from, or the A
that B
derives from?
The solution is to use virtual inheritance to derive B
and C
from A
, so that there is only one instance of A
.
Concrete
|
D
/ \
C B
\ /
A