Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Информатика_1 / C / lecture11 / strtod_example

.c
Скачиваний:
11
Добавлен:
09.06.2015
Размер:
592 б
Скачать
#include <stdlib.h>
#include <stdio.h>

void main( void )
{
   char   *string, *stopstring;
   wchar_t *wstring, *wstopstring;
   double x;
   string = "3.1415926This stopped it";
   wstring = L"3.1415926This stopped it";
   x = strtod( string, &stopstring );
   printf( "ANSI string = %s\n", string );
   printf("   strtod = %f\n", x );
   printf("   Stopped scan at: %s\n\n", stopstring );
   x = wcstod( wstring, &wstopstring );
   printf( "UNICODE string = %S\n", wstring );
   printf("   wcstod = %f\n", x );
   printf("   Stopped scan at: %S\n\n", wstopstring );

}
Соседние файлы в папке lecture11