long int strtol (const char* str, char** endptr, int base);
long intvalue. If endptr is not a null pointer, the function also sets the value of endptr to point to the first character after the number.
'0'and up to
'Z'for radix 36). The sequence may optionally be preceded by a sign (either
-) and, if base is 16, an optional
"C"locale, additional subject sequence forms may be accepted.
char*, whose value is set by the function to the next character in str after the numerical value.
0, the base used is determined by the format in the sequence (see above).
long int, the function returns LONG_MAX or LONG_MIN (defined in <climits>), and errno is set to ERANGE.
The decimal equivalents are: 2001, 6340800, -3624224 and 7340031