reinterpret_cast本质
reinterpret_cast 可以将一个类型所包含二进制内容,重新解释为另一种类型。
#include < iostream >
using namespace std;
void main()
{
int i = 875770417 ;
cout << i << " " ;
char * p = reinterpret_cast < char *> ( & i);
for ( int j = 0 ; j < 4 ; j ++ )
cout << p[j];
cout << endl;
float f = 0.00000016688933 ;
cout << f << " " ;
p = reinterpret_cast < char *> ( & f);
for (int j = 0 ; j < 4 ; j ++ )
cout << p[j];
cout << endl;
}