
10.11.2008, 23:27
|
|
Участник форума
Регистрация: 07.07.2008
Сообщений: 161
С нами:
9391926
Репутация:
234
|
|
http://www.cplusplus.com/reference/clibrary/cstdlib/strtod.html
вот пример оттуда:
PHP код:
/* strtod example */
#include <stdio.h>
#include <stdlib.h>
int main ()
{
char szOrbits[] = "365.26 27.32";
char * pEnd;
double d1, d2;
d1 = strtod (szOrbits,&pEnd);
d2 = strtod (pEnd,NULL);
printf ("The moon completes %.2lf orbits per Earth year.\n", d1/d2);
return 0;
}
|
|
|