花之剑'HOME

一朵飘舞在风中的雪花,挣扎着,不想被融化。

C中字符串转换函数

Posted on 2007-05-21 14:50 花之剑 阅读(484) 评论(2)  编辑  收藏 所属分类: c/c++ & algorithm
1.atoi(const char *nptr)
将字符串转换为整数

char *p="123456";
int a=atoi(p);
2.atol(const char *nptr)
将字符串转换为长整数
char *p="123456";
long a=atol(p);
3.atof(const char *nptr)
将字符串转为浮点型

Feedback

# re: C中字符串转换函数  回复  更多评论   

2007-06-02 18:30 by betty
好久没更新了啊

# re: C中字符串转换函数  回复  更多评论   

2007-06-03 21:30 by lantin
呵呵
惭愧

只有注册用户登录后才能发表评论。


网站导航: