std::basic_string::operator[]
De cppreference.com
[] |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody> reference operator[]( size_type pos ); |
||
const_reference operator[]( size_type pos ) const; |
||
Renvoie une rfrence au caractre
pos emplacement spcifi. Aucune vrification de limites est effectue .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 version const retourne une rfrence au caractre avec la valeur
CharT()(le caractre nul). (avant C++11)Original:The const version returns a reference to the character with valueCharT()(the null character). (avant C++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Les deux versions renvoie une rfrence au caractre avec la valeur
CharT()(le caractre nul). Modification du caractre nul grce des rsultats de rfrence non-const un comportement indfini. (depuis C++11)Original:Both versions returns a reference to the character with valueCharT()(the null character). Modifying the null character through non-const reference results in undefined behavior. (depuis C++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Paramtres
| pos | - | position du caractre retourner
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. |
Retourne la valeur
rfrence au caractre requis
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.
Complexit
Constante
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.
Voir aussi
| accde au caractre spcifi avec contrle de bornes (fonction membre publique) | |