c++ builder 中怎样把char变量x的高低位互换???(10分)

  • 主题发起人 主题发起人 kmwap
  • 开始时间 开始时间
K

kmwap

Unregistered / Unconfirmed
GUEST, unregistred user!
[?]c++ builder 中怎样把char变量x的高低位互换???
 
BYTE LowToHigh (BYTE ch)
{
return ((ch &
0x01) << 7) + ((ch &amp;
0x02) << 5)
+ ((ch &amp;
0x04) << 3) + ((ch &amp;
0x08) << 1)
+ ((ch &amp;
0x10) >> 1) + ((ch &amp;
0x10) >> 3)
+ ((ch &amp;
0x40) >> 5) + ((ch &amp;
0x80) >> 7);
}
 
时间太久,强制结束。
 
后退
顶部