Namespace
Varianti

std::stof, std::stod, std::stold

Da cppreference.com.
< cpp‎ | string‎ | basic string

 
 
Stringhe libreria
Null-stringhe terminate
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Byte stringhe
Multibyte stringhe
Stringhe larghe
Classi
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
std::basic_string
Membri funzioni
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::basic_string
basic_string::operator=
basic_string::assign
basic_string::get_allocator
Elemento accesso
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::at
basic_string::operator[]
basic_string::front(C++11)
basic_string::back(C++11)
basic_string::data
basic_string::c_str
Iteratori
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::begin
basic_string::cbegin

(C++11)
basic_string::end
basic_string::cend

(C++11)
basic_string::rbegin
basic_string::crbegin

(C++11)
basic_string::rend
basic_string::crend

(C++11)
Capacità
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::empty
basic_string::size
basic_string::length
basic_string::max_size
basic_string::reserve
basic_string::capacity
basic_string::shrink_to_fit(C++11)
Operazioni
Original:
Operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::clear
basic_string::insert
basic_string::erase
basic_string::push_back
basic_string::pop_back(C++11)
basic_string::append
basic_string::operator+=
basic_string::compare
basic_string::replace
basic_string::substr
basic_string::copy
basic_string::resize
basic_string::swap
Cerca
Original:
Search
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::find
basic_string::rfind
basic_string::find_first_of
basic_string::find_first_not_of
basic_string::find_last_of
basic_string::find_last_not_of
Costanti
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string::npos
Non membri funzioni
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator+
operator==
operator!=
operator<
operator>
operator<=
operator>=
swap(std::basic_string)
operator<<
operator>>
getline
stoi
stol
stoll
(C++11)
(C++11)
(C++11)
stoul
stoull
(C++11)
(C++11)
stof
stod
stold
(C++11)
(C++11)
(C++11)
to_string(C++11)
to_wstring(C++11)
Helper classi
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
hash<std::string>
hash<std::wstring>
hash<std::u32string>
hash<std::u16string>
(C++11)
 
Elemento definito nell'header <string>
float       stof( const std::string& str, size_t *pos = 0 );
(1) (dal C++11)
double      stod( const std::string& str, size_t *pos = 0 );
(2) (dal C++11)
long double stold( const std::string& str, size_t *pos = 0 );
(3) (dal C++11)
Interpreta un valore in virgola mobile in un str stringa.
Original:
Interprets a floating point value in a string str.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funzione scarta eventuali spazi bianchi (come determinato dal std::isspace()) fino al primo carattere non-spazio si trova. Poi ci vuole come numero possibile di caratteri in modo da formare una valida rappresentazione in virgola mobile e li converte in valore in virgola mobile. Il valore di virgola mobile valido può essere uno dei seguenti:
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.
  • espressione decimale in virgola mobile. Si compone delle seguenti parti:
    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.
  • (opzionale) più o segno meno
    Original:
    (opzionale) 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.
  • sequenza non vuota di cifre decimali eventualmente contenenti un carattere punto decimale (definisce significante)
    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.
  • (opzionale) e o E seguito con meno opzionali o segno più e la sequenza non vuota di cifre decimali (definisce esponente)
    Original:
    (opzionale) 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.
  • binario espressione virgola mobile. Si compone delle seguenti parti:
    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.
  • (opzionale) più o segno meno
    Original:
    (opzionale) 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
  • sequenza non vuota di cifre esadecimali eventualmente contenenti un carattere punto decimale (definisce significante)
    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.
  • (opzionale) p o P seguito con meno opzionali o segno più e la sequenza non vuota di cifre esadecimali (definisce esponente)
    Original:
    (opzionale) 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.
  • infinito espressione. Si compone delle seguenti parti:
    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.
  • (opzionale) più o segno meno
    Original:
    (opzionale) 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 o INFINITY ignorando caso
    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.
  • not-a-numero di espressione. Si compone delle seguenti parti:
    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.
  • (opzionale) più o segno meno
    Original:
    (opzionale) 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 o NAN( char_sequence ) ignorando caso della parte NAN. Char_sequence' può contenere solo caratteri alfanumerici. Il risultato è un tranquillo punto di valore NaN mobile.
    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.
L'indice del primo carattere non convertito viene memorizzato in pos. Se NULL viene passato come pos, viene ignorato.
Original:
The index of the first unconverted character is stored in pos. If NULL is passed as pos, 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.

Indice

[modifica] Parametri

str -
la stringa da convertire
Original:
the string to convert
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pos -
indirizzo di integer per memorizzare l'indice del primo carattere non convertito
Original:
address of integer to store the index of the first unconverted character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Valore di ritorno

La stringa convertita nel tipo specificato in virgola mobile.
Original:
The string converted to the specified floating point type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Eccezioni

std::invalid_argument se la conversione non può essere eseguita
Original:
std::invalid_argument if no conversion could be performed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::out_of_range se il valore convertito cadere fuori del campo del tipo di risultato.
Original:
std::out_of_range if the converted value would fall out of the range of the result type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Vedi anche

(C++11)
(C++11)
(C++11)
converte una stringa in un intero con segno
(funzione) [modifica]
(C++11)
(C++11)
converte una stringa in un intero senza segno
(funzione) [modifica]