I understand that reinterpret_cast is dangerous, I\'m just doing this to test it. I have the following code:
int x = 0;
double y = reinterpret_c
reinterpret_cast is best used for pointers. So a pointer to one object can be turned into a "submarine".
From msdn:
The reinterpret_cast operator can be used for conversions such as char* to int*, or One_class* to Unrelated_class*, which are inherently unsafe.
The result of a reinterpret_cast cannot safely be used for anything other than being cast back to its original type. Other uses are, at best, nonportable.