代码
float 读小数(int 内存地址)
{
_asm
{
mov eax, [内存地址]
mov eax, [eax]
}
return;
}
void _tmain()
{
printf("%f\n",读小数(0x00040000));
}
这样子读出来的小数是:-1.#IND00
而使用读整数的 就可以读出来准确的整数
int 读整数(int 内存地址)
{
_asm
{
mov eax, [内存地址]
mov eax, [eax]
}
return;
}
void _tmain()
{
printf("%d\n",读整数(0x00040000));
}
本人菜鸟,请问高手们 怎样才能准确读出内存中的浮点型小数呢?