字符串转换为长整型 strtol

strtol, wcstol

Convert strings to a long-integer value.

Routine Required Header
strtol <stdlib.h>
wcstol <stdlib.h>

 

long strtol( const char *nptr, char **endptr, int base );
long wcstol( const wchar_t *nptr, wchar_t **endptr, int base );

Parameters

nptr
Null-terminated string to convert
endptr
Pointer to character that stops scan
base
Number base to use 

 

上一篇:strtol函数


下一篇:[转载] strtol() -- 将字符串转换成长整型数(转载)