July 12, 2015
Type casting or Type Conversion is a process of converting a value of one data type to another data type. In C++, type casting takes place implicitly and explicitly, implicit type casting is done automatically by the compiler while explicit type casting is undertaken by programmer. There have always been confusion around C++ explicit type casting, particularly when dealing with polymorphic pointers and references. In this post I am trying to explain uses of C++ specific type conversion functions when dealing with user defined classes.