float m_a=34;
float m_b=45;
int m_c=55;
CString
temp[13];
long int j;
temp[0]="EB";
temp[1]="90";
temp[12]="4E";
temp[2].Format("%X",(m_a&(0xFF00))>>8);
temp[3].Format("%X",m_a&(0x00FF));
j=m_b*3.14159265/180*10000000;
temp[4].Format("%X",(j&(0xFF000000))>>24);
temp[5].Format("%X",(j&(0x00FF0000))>>16);
temp[6].Format("%X",(j&(0x0000FF00))>>8);
temp[7].Format("%X",(j&(0x000000FF)));
j=m_c*3.14159265/180*10000000;
temp[8].Format("%X",(j&(0xFF000000))>>24);
temp[9].Format("%X",(j&(0x00FF0000))>>16);
temp[10].Format("%X",(j&(0x0000FF00))>>8);
temp[11].Format("%X",(j&(0x000000FF)));
这样的代码,我输出的时候 tmp[2],tmp[4],tmp[8]如果计算结果是0的时候,输出就是一个0,但是我期望的结果是2BYTE的00,谁知道应该怎么改呀
|