1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
/* wcstoul example */
#include <stdio.h>
#include <wchar.h>
int main ()
{
wchar_t wsInput [256];
unsigned long ul;
wprintf (L"Enter an unsigned number: ");
fgetws (wsInput,256,stdin);
ul = wcstoul (wsInput,NULL,0);
wprintf (L"Value entered: %lu. Its double: %lu\n",ul,ul*2);
return 0;
}
|