2.1.6.38 strtod


Contents

Description

Converts a character string to a double value.

Syntax

double strtod( const char * str, char ** endptr )

Parameters

str
[input] Points to a character string to convert.
endptr
[output] if not NULL, returns a string beginning with the first character that strtod() does not attempt to convert.

Return

returns the converted double value, else zero value is returned.

Examples

EX1

void strtod_ex()
{
    double ret = strtod(" -0xa2", NULL);    
    out_double("ret = ", ret);
}

Remark

See Also

ftoa,strtol


Header to Included

origin.h

Reference