Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Programming/Code/Standard C Library/Functions/atof

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

atof #include <cstdlib> double atof( const char *str ); The function atof() converts str into a double, then returns that value. str must start with a valid number, but can be terminated with any non-numerical character, other than "E" or "e". For example, x = atof( "42.0is_the_answer" ); results in x being set to 42.0. Related topics atoi - atol - strtod(Standard C I/O) sprintf