-
#include "stdafx.h"
-
#include <process.h>
-
-
int _tmain(int argc, _TCHAR* argv[])
-
{
-
-
unsigned char pMem[] = {0x66,0xE6,0xF0,0x42};
-
float *p = (float*)pMem;
-
printf("%g\r\n",*p);
-
-
-
float a=120.45f;
-
unsigned char * b = (unsigned char*)&a;
-
-
for(int i = 0; i<4; i++)
-
printf("0x%2X,", b[i]);
-
-
system("pause");
-
return 0;
-
}
|
|