首页 > 其他 > 详细

10转16进制 进制转2进制

时间:2019-08-16 18:21:54      阅读:64      评论:0      收藏:0      [点我收藏+]

CString CSFCApp::DecToHex(int iSource)
{
CString str;
str.Format(_T("%X"), iSource);
return str;
}

 

 

void CSFCApp::DecToBin(CString strSource, CUIntArray *IntAry)
{
IntAry->RemoveAll();
if(!IsNum(strSource)) return;
int iSource = atoi(strSource);
while(iSource>=2)
{
int k = iSource%2;
iSource/=2;
IntAry->Add(k);
}
IntAry->Add(iSource);
}

10转16进制 进制转2进制

原文:https://www.cnblogs.com/ShiShouTHS/p/11365185.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!