I'm a embedded software engineer! I'm now learning English. and i like photography. I also like Programming with Python, and learning the Turbo Gears! for Web Development!

Tuesday, July 15, 2008

转换16进制字符串为整数 C++ hexidecimal string to integer/long

strtol:convert strings to a long-integer value.
strtod: Convert strings to a double-precision value.




long strtol(
const char *nptr,
char **endptr,
int base
);
long wcstol(
const wchar_t *nptr,
wchar_t **endptr,
int base
);
long _strtol_l(
const char *nptr,
char **endptr,
int base,
_locale_t locale
);
long _wcstol_l(
const wchar_t *nptr,
wchar_t **endptr,
int base,
_locale_t locale
);

double strtod(
const char *nptr,
char **endptr
);
double _strtod_l(
const char *nptr,
char **endptr,
_locale_t locale
);
double wcstod(
const wchar_t *nptr,
wchar_t **endptr
);
double wcstod_l(
const wchar_t *nptr,
wchar_t **endptr,
_locale_t locale
);

Routine

Required header

strtol,__strtol_l

strtod, _strtod_l

wcstol,

wcstod, _wcstod_l

or


No comments: