•//we assume here that the
class Derived is derived from the class Base
•Base B;
•Derived D;
•B = D; //legal
•D = B; //not legal
•Base *Bp; Derived *Dp;
•Bp = Dp; Bp = &B; Bp =
&D; //all legal
•Dp = Bp; Dp = &B; //all
not legal
•Base &Br = B; Derived
&Dr = D;
•Br = Dr; Br = D; //all
legal
•Dr = Br; Dr = B; //all not
legal
•
•