C and C++ Programming Resources | C & C++ Code Example Index | C++ Code Example Index

 

 

 

 

The C and C++ Typecasting Sample Codes Index Page

 

The following list provides the links to the C and C++ source codes for typecasting. The typecasting are used for manual type casting or conversion and mainly dominated by C++. In C++ the object typecasting uses the available classes while in C, typecasting is not so obvious.

 

 

C & C++ Typecasting (The C & C++ typecasting code example in doing the manual type casting)

  1. Retrieving the run time type information (RTTI) using C++ typeid() method code example

  2. The run time type information (RTTI): retrieving the C++ class object type information C++ program example

  3. Using the C++ typeid operator, type_info::before() and type_info::name() methods

  4. Using the C++ reinterpret_cast, re-interpreting an integer to unsigned integer pointers

  5. The C++ class object dynamic_cast ambiguous conversion program example

  6. Testing the downcast, upcast and crosscast class object casting using the C++ dynamic_cast

  7. The multiple inheritance casting using the C++ dynamic_cast code sample

  8. The downcast conversion using C++ dynamic_cast, casting the base object class to derived class

  9. The void pointer and dynamic_cast C++ program example

  10. The upcast conversion using C++ dynamic_cast, converting derived object class to base class

  11. Using mutable keyword to remove the const-ness of the function C++ example

  12. Removing the const-ness (constantness) of the 'this' pointer C++ code sample

  13. Using the const and volatile keyword in C++ programming

  14. The const C++ example to declare a constant variable

  15. Another const_cast C++ example converting the constant variable

  16. The const_cast C++ example to convert the constant to normal variable

  17. Another static_cast C++ program example converting different data types

  18. The static_cast C++ example for different typecasting

 

 

C and C++ Programming Resources | C & C++ Code Example Index | C++ Code Example Index