C语言 字符串转数字 急急急

[复制链接]
查看11 | 回复3 | 2011-12-18 15:15:08 | 显示全部楼层 |阅读模式
#include#include#includeint tran16to10(char *s){int i,z=0,j;j=strlen(s);for(i=0;i='A'&&s='a'&&s='0'&&sunsigned long htoi(const char* szHex){ unsigned long temp; sscanf(szHex, "%x", &temp);return temp;}int main(){ char szHex[16]; print...
回复

使用道具 举报

千问 | 2011-12-18 15:15:08 | 显示全部楼层
直接用他们的acsii码呀!再加上用指针就可以了!你试试...
回复

使用道具 举报

千问 | 2011-12-18 15:15:08 | 显示全部楼层
scanf和printf算库函数么...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行