Casting operators are used for controling casting in C++.
dynamic_cast operator: It is used for doing a run time cast to check the validity of a cast. It is used to cast pointers and references from one type to another.
Syntax of dynamic_cast:
const_cast operator: It is used to control the const and volatile in a cast.
Syntax of const_cast:
static_cast operator: It is used to do a cast which is not polymorphic in nature.
Syntax of static_cast:
reinterpret_cast operator: It is used to change one type to another. For Example , to change a double to pointer.
Syntax of reinterpret_cast: