Показать сообщение отдельно

  #5  
Старый 10.11.2008, 23:27
jawbreaker
Участник форума
Регистрация: 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;
} 
 
Ответить с цитированием