没有合适的资源?快使用搜索试试~ 我知道了~
Cstring 与BYTE类型之间转换
![star](https://csdnimg.cn/release/downloadcmsfe/public/img/star.98a08eaa.png)
温馨提示
Cstring 与BYTE类型之间转换,实现字节与字符串的转换,将字符串转化为字节类型。0进制与16进制间转换
资源推荐
资源详情
资源评论
![txt](https://img-home.csdnimg.cn/images/20210720083642.png)
![cs](https://img-home.csdnimg.cn/images/20210720083646.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![cpp](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/release/download_crawler_static/4190312/bg1.jpg)
BOOL HexToDec(LPCTSTR shex, int& idec)
{
int i, mid;
int len = lstrlen(shex);
if(len>8)
return FALSE;
mid = 0; idec = 0;
for(i=0; i<len; i++)
{
if(shex[i]>='0' && shex[i]<='9')
mid = shex[i]-'0';
else if(shex[i]>='a' && shex[i]<='f')
mid = shex[i] -'a' +10;
else if(shex[i]>='A' && shex[i]<='F')
mid = shex[i] -'A' +10;
else
return FALSE;
mid <<= ((len-i-1)<<2);
idec |= mid;
}
return TRUE;
}
BOOL DecToHex(int idec, LPTSTR shex, int size)
{
TCHAR s[10];
itoa(idec,s,16);
int ilen = strlen(s);
if(ilen > size)
return FALSE;
TCHAR t[16]={0};
for(int i=ilen; i<size; i++)
strcat(t,_T("0"));
strcat(t,s);
strcat(shex,t);
return TRUE;
![avatar](https://profile-avatar.csdnimg.cn/6c948831b5dc4ea8853162e28d2d764d_nma_123456.jpg!1)
nma_123456
- 粉丝: 43
- 资源: 100
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)
- 1
- 2
- 3
- 4
- 5
- 6
前往页