upcast / downcast in the c ++

In fact, upcast and downcast not how I see the book before the C ++ too, but added Java seems to have mentioned that interview when asked to upcast and downcast after then asked to cast the issue in depth direction. Because before had never seen so ignorant of the force

up / down java in the cast is used to avoid ambiguity when calling the base class.

 

Guess you like

Origin www.cnblogs.com/sunchuankai/p/11311357.html
C