Пространства имён
Варианты
Действия

std::wcstof, std::wcstod, std::wcstold

Материал из cppreference.com

 
 
 
Null-завершенный широкий строк
Функции
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Персонаж манипуляции
Original:
Character manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Преобразование в цифровой формат
Original:
Conversions to numeric formats
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
wcstof
wcstod
wcstold
Строками
Original:
String manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Массив манипуляции
Original:
Array manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
wmemcpy
wmemmove
wmemcmp
wmemchr
wmemset
 
Заголовочный файл <cwchar>
float       wcstof( const wchar_t* str, wchar_t** str_end );
(начиная с C++11)
double      wcstod( const wchar_t* str, wchar_t** str_end );
long double wcstold( const wchar_t* str, wchar_t** str_end );
(начиная с C++11)
Интерпретирует значение с плавающей точкой в ​​строку широких указывает str.
Original:
Interprets a floating point value in a wide string pointed to by str.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Функция удаляет все пробельные символы (как определено std::isspace()), пока первый не-символу найдено. Затем он берет столько символов, сколько возможно, чтобы сформировать правильное представление с плавающей точкой и преобразует их в значение с плавающей точкой. Допустимые значения с плавающей точкой может быть одним из следующих способов:
Original:
Function discards any whitespace characters (as determined by std::isspace()) until first non-whitespace character is found. Then it takes as many characters as possible to form a valid floating point representation and converts them to floating point value. The valid floating point value can be one of the following:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • десятичных чисел с плавающей точкой выражение. Он состоит из следующих частей:
    Original:
    decimal floating point expression. It consists of the following parts:
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (необязательно) знаком плюс или минус
    Original:
    (необязательно) plus or minus sign
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • непустая последовательность десятичных цифр, необязательно содержащую символ десятичной точки (определяет мантиссы)
    Original:
    nonempty sequence of decimal digits optionally containing a decimal point character (defines significand)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (необязательно) e или E затем с дополнительным минусом или плюсом и непустая последовательность десятичных цифр (определяет показатель степени)
    Original:
    (необязательно) e or E followed with optional minus or plus sign and nonempty sequence of decimal digits (defines exponent)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • двоичных чисел с плавающей точкой выражение. Он состоит из следующих частей:
    Original:
    binary floating point expression. It consists of the following parts:
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (необязательно) знаком плюс или минус
    Original:
    (необязательно) plus or minus sign
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 0x or 0X
  • непустая последовательность шестнадцатеричных цифр, необязательно содержащую символ десятичной точки (определяет мантиссы)
    Original:
    nonempty sequence of hexadecimal digits optionally containing a decimal point character (defines significand)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (необязательно) p или P затем с дополнительным минусом или плюсом и непустая последовательность шестнадцатеричных цифр (определяет показатель степени)
    Original:
    (необязательно) p or P followed with optional minus or plus sign and nonempty sequence of hexadecimal digits (defines exponent)
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • бесконечности выражения. Он состоит из следующих частей:
    Original:
    infinity expression. It consists of the following parts:
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (необязательно) знаком плюс или минус
    Original:
    (необязательно) plus or minus sign
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • INF или INFINITY без учета регистра
    Original:
    INF or INFINITY ignoring case
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Не-число выражения. Он состоит из следующих частей:
    Original:
    not-a-number expression. It consists of the following parts:
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (необязательно) знаком плюс или минус
    Original:
    (необязательно) plus or minus sign
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • NAN или NAN(' char_sequence ) игнорируя случае NAN части. ' Char_sequence может содержать только буквенно-цифровые символы. В результате тихой NaN значение с плавающей точкой.
    Original:
    NAN or NAN(char_sequence) ignoring case of the NAN part. char_sequence can only contain alphanumeric characters. The result is a quiet NaN floating point value.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Функции устанавливает указатель на которую указывает str_end указывают на широкий символ после последнего символа интерпретируются. Если str_end является NULL, он игнорируется.
Original:
The functions sets the pointer pointed to by str_end to point to the wide character past the last character interpreted. If str_end is NULL, it is ignored.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Содержание

[править] Параметры

str -
Указатель нулем строку широких следует толковать
Original:
pointer to the null-terminated wide string to be interpreted
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
str_end -
Указатель на указатель на широкий характер .
Original:
pointer to a pointer to a wide character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[править] Возвращаемое значение

С плавающей точкой значения, соответствующего содержания str на успех. Если преобразованное значение выпадает из диапазона соответствующий тип возвращения, диапазон ошибки и HUGE_VAL, HUGE_VALF или HUGE_VALL возвращается. Если преобразование не может быть выполнено, 0 возвращается.
Original:
Floating point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[править] Пример

[править] См. также