Describe the different types of casting available in C++
const cast - removes const or volatile from a type.
dynamic cast - runtime upcasting or downcasting of polymorphic classes to navigate class heirarchy.
static cast - compile time casting. arithmetic, int to enum, downcasting of nonpolymorphic classes.
reinterperate cast - cast any type to any other type. dangerous.
dynamic cast - runtime upcasting or downcasting of polymorphic classes to navigate class heirarchy.
static cast - compile time casting. arithmetic, int to enum, downcasting of nonpolymorphic classes.
reinterperate cast - cast any type to any other type. dangerous.

0 Comments:
Post a Comment
<< Home