If you don’t understand what a cast is.
If you have 2 classes, Food and Apple (deriving from Food), you can say these things in programming:
*Apple is a food.
*Food is not an apple.
If the Food class has a property “Taste”, Apple will have it too. Apple can declare a new property “Color” on itself which its parent class Food will not have. To access the Color property you need to cast whatever object reference you have to Apple.
Casting is like a question. Is this object an apple? a car? a person? and if so, you can use the result of the cast to access properties and methods which belong to it. You would not cast Apple to Food, because it is Food already. if the thing you cast is invalid (nullptr) it will fail the cast as well, being nothing.