C++ Programming/Code/Standard C Library/Functions/strtol
< C++ Programming < Code < Standard C Library < Functionsstrtol
Syntax |
#include <cstdlib>
long strtol( const char *start, char **end, int base );
|
The strtol() function returns whatever it encounters first in start as a long, doing the conversion to base if necessary. end is set to point to whatever is left in start after the long. If the result can not be represented by a long, then strtol() returns either LONG_MAX or LONG_MIN. Zero is returned upon error.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.