double wcstod(const wchar_t* kwpString, wchar_t** wppEndPtr);
#include <cwchar>
int main()
{
wchar_t waString[] = L"3.14159XoaX.net";
wchar_t* wpEndPtr;
// Convert the digits and set the end pointer
double dConversion = wcstod(waString, &wpEndPtr);
wprintf(L"Convert the string \"%ws\" up to \"%ws\"\n",
waString, wpEndPtr);
wprintf(L"The result is %f\n", dConversion);
// Keep the window open until "Enter" is pressed
getwchar();
return 0;
}
© 20072026 XoaX.net LLC. All rights reserved.