std::basic_string::operator[]
Da cppreference.com.
< cpp | string | basic string
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
reference operator[]( size_type pos ); | ||
const_reference operator[]( size_type pos )const; | ||
Restituisce un riferimento al personaggio di
pos
posizione specificata. Nessun controllo dei limiti viene eseguito.Original:
Returns a reference to the character at specified location
pos
. No bounds checking is performed.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
If pos==size(),
- La versione const restituisce un riferimento al personaggio con il valore CharT() (il carattere null). (fino al c++11)Original:The const version returns a reference to the character with value CharT() (the null character). (fino al c++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Entrambe le versioni restituisce un riferimento al personaggio con il valore CharT() (il carattere null). Modifica del carattere null attraverso la non-const risultati di riferimento a un comportamento indefinito. (dal C++11)Original:Both versions returns a reference to the character with value CharT() (the null character). Modifying the null character through non-const reference results in undefined behavior. (dal C++11)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
pos | - | posizione del carattere da restituire Original: position of the character to return 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
riferimento al carattere richiesto
Original:
reference to the requested character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica]Complessità
Constant
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica]Vedi anche
accede al carattere richiesto con controllo dei limiti (metodo pubblico) |