This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

28069指针赋值问题



_iq sEEPROM_ReadFloat (unsigned short adr)
{
 unsigned char adrH,adrL,Dat[4];
 _iq *rDat=(_iq *)Dat;
 _iq re=_IQ(0.0);

……

……

……

 re = (_iq)(*rDat);
 return re;
}

以上代码是一个完整的函数。在红色部分代码赋值时出现问题。变量re得到的值既不是rDat指向的地址,也不是rDat指向地址里的值。(是另外一个恒定值)

望高手指点。