std::basic_string::operator[]
De cppreference.com
< cpp | string | basic string
![]() |
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. |
reference operator[]( size_type pos ); |
||
const_reference operator[]( size_type pos ) const; |
||
Devuelve una referencia al carácter en
pos
ubicación especificada. Sin comprobación de límites se realiza .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 versión const devuelve una referencia al carácter con valor CharT() (el carácter nulo). (hasta C++11)Original:The const version returns a reference to the character with value CharT() (the null character). (hasta C++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - Ambas versiones devuelve una referencia al carácter con valor CharT() (el carácter nulo). Modificar el carácter nulo a través de resultados de referencia no const en un comportamiento indefinido. (desde 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. (desde C++11)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Contenido |
[editar] Parámetros
pos | - | posición del carácter para volver
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. |
[editar] Valor de retorno
referencia al carácter solicitado
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.
[editar] Complejidad
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.
[editar] Ver también
acceder carácter especificado con comprobación de límites Original: access specified character with bounds checking The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro público función) |