#include<iostream>
#include<windows.h>
using namespace std;


int main(void)
{
 float f = 1.1 ;
 DWORD d1 = (DWORD)f ;
 DWORD d2 = *(DWORD *)&f ;

 cout << d1 << endl ; // output: 1
 cout << d2 << endl ; // output: 1066192077

 system("pause") ;
 return 0 ;
}

相关文章: