Non-decimal radices/Convert: Difference between revisions
Content added Content deleted
Line 261: | Line 261: | ||
{ |
{ |
||
return strtol(num_str, NULL, base); |
return strtol(num_str, NULL, base); |
||
// there is also strtoul() for parsing into an unsigned long |
|||
// in C99, there is also strtoll() and strtoull() for parsing into long long and unsigned long long, respectively |
|||
}</lang> |
}</lang> |
||