#include using namespace std ; int main() { int x1 = 10; float f1 = 10.5 ; //x1 = reinterpret_cast(f1); x1 = *reinterpret_cast( &f1 ); cout << x1 << endl ; //gibberish result x1 = (int)f1 ; cout << x1 << endl ; //works the right way x1 = static_cast( f1 ); cout << x1 << endl ; //works the right way //pointer to pointer conversions int x2 = 15 ; int* p1 = &x2 ; char* c1 = reinterpret_cast(p1) ; cout << (int)(*c1) << endl ; //works the way we expect it to work //pointer to integer conversion long x3 = reinterpret_cast(p1) ; cout << x3 << endl ; //works at a bit level }