If you have a Base*
pointer you can dynamic_cast<DeriA*>
. The result will be the cast object or NULL if it is not a DeriA
.
However, you are dealing with values. A Base
(not Base*
) that you store in the list will always only be a Base
and not a derived object. If you ever had a DeriA
that you put in there, you probably sliced the rest of at some point.