Use operator << and >>
解决方案 »
- VC6.0如何连接起多个文件 按什么键(新手)这里就一个。h文件和一个。cpp文件内容如下
- VC入门级问题
- 一个vc小问题
- WTL如何重绘tabctrl控件
- VC6.0 移到 2003 CString 编译报错问题
- 没有办法使用XML Parser一般是什么原因啊?
- 请问一个有名管道的连接问题
- 有人做过ftp吗,用CFtpFileFind只能找到根目录,再到一下级目录根本就找不出来啊
- 用VC+ACCESS做的应用程序不能运行
- 二个小问题
- float f=0.0651怎么转换成CString cs="0.07"
- 请问高手,怎么样得到另一个正在运行的程序的进程ID号,比如得到Explor.exe的进程ID号?
同意楼上的和楼下的。
byte NegateValue(byte ainput)
{
byte retvalue=0;
byte tmp;
for(int j=0;j<8;j++)
{
tmp=ainput & (2^j);
if(j<=3)
tmp=tmp<<(7-j);
else
tmp=tmp>>(2 * j-7);
retvalue=retvalue | tmp;
}
return retvalue;
}
a=youedata;
b=0;
for(int i=0;i<8;i++)
{
b=(b<<1)|(a&0x01);
a=a>>1;
}
a=youedata;
b=a&0x0f;
a=(b<<4)|(a>>4)
这么麻烦的方法也好意思写出来!!!
#define BYTE_SWAP(b) (( b >> 4) | ((b & 0x0F) << 4) )
是不是把 "abcdefgh"变成"hgfedcba"?
beni() 的对了,我错了,我是人渣。noho(听,钱在说话) 也错了,输入1得16,嘿嘿,byte应该是8位。
BYTE bValue;
short iHigh,iLow;
// get the the value of the low
iLow = bValue % 16;
//get the value of the high
iHigh =bValue - iLow
BYTE newValue;
newValue = iLow *16 + iHigh/16;
OK!
你的方法我试了一下,题目
“如00000011变成11000000”这个要求都没满足
我们是探讨问题,没必要用“人渣”这词