














Parameters
-
str String to be converted.
locale Locale to use.
Return Value
Each function returns the int value produced by interpreting the input characters as a number. The return value is 0 for atoi and _wtoi, if the input cannot be converted to a value of that type.
In Visual C++ 2005, in the case of overflow with large negative integral values, LONG_MIN is returned. atoi and _wtoi return INT_MAX and INT_MIN on these conditions. In all out-of-range cases, errno is set to ERANGE. If the parameter passed in is NULL, the invalid parameter handler is invoked, as described in Parameter Validation. If execution is allowed to continue, these functions set errno to EINVAL and return 0.

















































Parameters
-
[in]
value Number to be converted.
[out]
buffer Filled with the result of the conversion.
[in]
sizeInCharacters Size of the buffer in single-byte characters or wide characters.
[in]
radix Base of
value; which must be in the range 2–36.
Return Value
Zero if successful; an error code on failure. If any of the following conditions applies, the function invokes an invalid parameter handler, as described in Parameter Validation.
Security Issues
These functions can generate an access violation if buffer does not point to valid memory and is not NULL, or if the length of the buffer is not long enough to hold the result string.