Scroll Down to See All▾
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexpldivlocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1ynFunction Details : wcstod
doublewcstod(const wchar_t * nptr,wchar_t ** endptr) ;
Return Type : double
Double-precision floating point (±1.7E±308, ~15 decimal digits)
Read about return values of wcstod function .
1st Parameter Type : const wchar_t *
A pointer to a read-only wide-character string, where each character is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets, such as Unicode. The string is null-terminated, with the terminator being a `wchar_t` with value 0.
1st Parameter
Pointer to the null-terminated wide-character string to be converted.
2nd Parameter Type : wchar_t **
Type wchar_t ** parameters
2nd Parameter
Pointer to a pointer to a wide character. It is set to the character in `nptr` where the conversion stopped.
Read more about parameters of wcstod in parameters section
The wcstodfunction in C language Converts the initial portion of a wide character string to a double-precision floating-point number.
wcstod interprets the wide-character string pointed to by nptr, producing a double value as a result. It skips leading whitespace, recognizes an optional plus or minus sign, and then parses the longest sequence of characters that form a valid floating-point representation.
The wcstodfunction takes 2
parameters:Converts the initial part of the wide-character string `nptr` to a `double` value. If `endptr` is not `NULL`, it points to the first character after the number that was converted.
- •const wchar_t * `nptr`: Pointer to the null-terminated wide-character string to be converted.
- •wchar_t ** `endptr`: Pointer to a pointer to a wide character. It is set to the character in `nptr` where the conversion stopped.
The wcstod function return value :
- Returns the converted double value
- If no conversion can be performed, 0
- 0 is returned
- If the correct value would cause overflow, HUGE_VAL (with the proper sign) is returned
- If the correct value would cause underflow, a value whose magnitude is no greater than the smallest normalized positive number is returned
Output
This example demonstrates the basic usage of wcstod to convert a wide string to a double value.