如何將字符串中的字符的ascii碼已字符形式打出來 例如:dword data;data=31323234;如何將其打出來為1234 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是我沒有問清楚嗎﹖data里面方著字符的ascii碼﹐31323334 = '1234'CString str;如何將data里的ascii碼轉化為字符串形式﹐放在str中 你试试下面这段代码,匆忙写的没有注释,也是胡乱命名的.但基本符合要求double a = 3132;int d;cstring str1 = "\0";cstring str2 = "\0";for ( ; a > 0 ; ){ d = a%10; a = a/10; d += 10*(a%10); a = a/10; d += 18;//十六进制到十进制数字ASCII码值转换 str1 += d;}for ( a=strlen (str1)-1 ; a>=0 ; a-- ){ str2 += str1[a];} CString temp="***************";for(int i=0;i<temp.GetLength();i++)printf("%02X",temp[i]);如何? 串口写函数 关于vc2010界面设计 vc怎么获取路由器的IP地址??????? 请教一个cspincontrol的问题? MFC中使用水晶报表 关于对话框的一个问题 用什么算法实现对文件加密/解密? 编译问题 ado连接数据库后插入记录后出现runtime error 如何在注册表中操作使exe程序开机自启动 关于程序流程的探讨 如果捕获窗口的最大化消息???
data里面方著字符的ascii碼﹐31323334 = '1234'CString str;如何將data里的ascii碼轉化為字符串形式﹐放在str中
int d;
cstring str1 = "\0";
cstring str2 = "\0";
for ( ; a > 0 ; )
{
d = a%10;
a = a/10;
d += 10*(a%10);
a = a/10;
d += 18;//十六进制到十进制数字ASCII码值转换
str1 += d;
}
for ( a=strlen (str1)-1 ; a>=0 ; a-- )
{
str2 += str1[a];
}
for(int i=0;i<temp.GetLength();i++)printf("%02X",temp[i]);如何?