精英盒子
->
程序设计
->
关于C++进制转换2->10
[打印本页]
iol
2011-08-17 17:01
关于C++进制转换2->10
long int btd(char *s)
{
long int rt=0;
int i,n=0;
while (s[n]) n++;
for (--n,i=n; i>=0; i--)
rt|=(s
-48)<<n-i;
return rt;
}
jybox
2011-08-17 18:05
我写过进制转换的教程,大概也就是这么个原理
iol
2011-08-17 18:33
...........
Powered by
phpwind
v8.7
Code ©2003-2011
phpwind
Time 0.038225 second(s),query:5 Gzip enabled