/* wcstoull example */ #include <wchar.h> int main () { wchar_t wsNumbers[] = L"250068492 7b06af00 1100011011110101010001100000 0x6fffff"; wchar_t * pEnd; unsigned long long int ulli1, ulli2, ulli3, ulli4; ulli1 = wcstoull (wsNumbers,&pEnd,10); ulli2 = wcstoull (pEnd,&pEnd,16); ulli3 = wcstoull (pEnd,&pEnd,2); ulli4 = wcstoull (pEnd,NULL,0); wprintf (L"The decimal equivalents are: %llu, %llu, %llu and %llu.\n", ulli1, ulli2, ulli3, ulli4); return 0; } |
The decimal equivalents are: 250068492, 2064035584, 208622688 and 7340031. |
strtoull | 将字符串转换为unsigned long long integer(function ) |
wcstoul | 将宽字符串转换为 unsigned long integer (function ) |
wcstod | 将宽字符串转换为double (function ) |
wcstoll | 将宽字符串转换为 long long integer (function ) |