std::vector::resize - cppreference.com
Da cppreference.com.
|
|
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. |
<metanoindex/>
<tbody> </tbody>
|
|
(fino al c++11) (dal C++11) (dal C++11) |
|
Ridimensiona il contenitore per contenere gli elementi count.
Original:
Resizes the container to contain count elements.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se la dimensione corrente è minore di count, elementi aggiuntivi vengono aggiunti e inizializzati con value.
Original:
If the current size is less than count, additional elements are appended and initialized with value.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se la dimensione corrente è maggiore count, il contenitore viene ridotta ai suoi primi count elementi.
Original:
If the current size is greater than count, the container is reduced to its first count elements.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Parametri
| count | - | nuove dimensioni del contenitore Original: new size of the container The text has been machine-translated via Google Translate. |
| value | - | il valore per inizializzare gli elementi nuovi Original: the value to initialize the new elements with The text has been machine-translated via Google Translate. |
Valore di ritorno
(Nessuno)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Complessità
lineare nella dimensione del contenitore
Original:
linear in the size of the container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Vedi anche
restituisce il numero di elementi Original: returns the number of elements The text has been machine-translated via Google Translate. (metodo pubblico) [modifica] | |