前提:int 四个字节
typedef unsigned long ulong
ulong toInt(ulong code)
{
ulong value;
value = ((((ulong)(code)&(ulong)0x000000ffUL)<<24)|\
(((ulong)(code)&(ulong)0x0000ff00UL)<<8)|\
(((ulong)(code)&(ulong)0x00ff0000UL)>>8)|\
(((ulong)(code)&(ulong)0xff000000UL)>>24));
return value;
}
阅读(1446) | 评论(0) | 转发(0) |