Shape and Circle are classes.Shape is the base class and Circle is derived from Shape class.Can someone tell me the meaning of the following statement:
Shape *p=new Circle();
Store the address of a Circle object in a pointer p. Circle inherits Shape and therefore Circle is a Shape and can be referred to as one. See polymorphism.
"Object Slicing" refer to the case where you assign an object of a derived class, to an object of the base class.
The keyword here is object. Not sure how you relate that to the OP's example.