C语言———strtol()详解
i.e. string to long
long int strtol(const char *nptr, char **endptr, int base)
strtol()会将nptr指向的字符串,根据参数base,按权转化为long int, 然后返回这个值。
参数base的范围为2~36,和0;它决定了字符串以被转换为整数的权值。
可以被转换的合法字符依据base而定,举例来说,当b
转载
2016-01-25 01:43:18 ·
1940 阅读 ·
0 评论