UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2004-10-11 04:56 PM

jhon
Member
Registered: 2004-08-23
Posts: 21

Re: string to double

char arr[]= '1.0000';

double x1 = SOME_FUNCTION(arr);

Offline

#2 2004-10-11 06:35 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: string to double

strtod(3).

(See also its manpage.)

Offline

#3 2004-10-12 08:56 AM

jhon
Member
Registered: 2004-08-23
Posts: 21

Re: string to double

strtod (string to double), strtold (string to long double), and strtof (string to float) are all in stdlib.h, as are strtol (string to long), strtoll (string to long long), strtoul (string to unsigned long), strtoull (string to unsigned long long), ect. ect. ect.

Offline

Board footer

Powered by FluxBB