分类: LINUX
2010-09-12 13:27:57
功 能: 把字符串转换成长整型数
用 法: int atoi(const char *nptr);
注: atoi参数中的字符串中,如果遇到非数字字符,就会停止转换。如
char str[] = "1a1234";
int i ;
i = atoi(str);
i 的结果为 1;
chinaunix网友2010-09-13 15:01:52
很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com