Static type checking occurs throughout the compilation process.
In that situation, no type information is used at runtime.
When type information is employed at runtime, dynamic type checking happens.
To do this, C++ employs a method known as RTTI (runtime type information).
The dynamic cast operator, which permits downcasting of polymorphic types, is the most popular use of RTTI:
// assuming that Circle derives from Shape...
Shape *shape = new Circle(50);
Circle *circle = dynamic_cast<Circle*> shape;
You may also use the typeid operator to determine the runtime type of objects.
You may use it, for example, to determine if the form in the example is a circle or a rectangle.