cpp/container/multimap/size: differenze tra le versioni
Da cppreference.com.
m (r2.7.3) (Bot: Aggiungo de, en, es, fr, pt, ru, zh) |
m (Use {{lc}}. Update links. Various fixes.) |
||
Riga 1: | Riga 1: | ||
− | {{page | + | {{page|cpp/container/size|multimap}} |
[[de:cpp/container/multimap/size]] | [[de:cpp/container/multimap/size]] |
Versione attuale delle 12:40, 2 lug 2013
![]() |
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. |
size_type size() const; |
||
Returns the number of elements in the container, i.e. std::distance(begin(), end()).
Indice |
[modifica] Parametri
(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.
You can help to correct and verify the translation. Click here for instructions.
[modifica] Valore di ritorno
il numero di elementi nel contenitore
Original:
the number of elements in the container
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] Eccezioni
[modifica] Complessità
Constant
[modifica] Esempio
The following code uses size
to display the number of elements in a std::multimap<int>:
#include <multimap> #include <iostream> int main() { std::multimap<int, char> nums {{1, 'a'}, {3, 'b'}, {5, 'c'}, {7, 'd'}}; std::cout << "nums contains " << nums.size() << " elements.\n"; }
Output:
nums contains 4 elements.
[modifica] Vedi anche
verifica se il contenitore è vuoto Original: checks whether the container is empty The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) | |
restituisce il massimo numero possibile di elementi Original: returns the maximum possible number of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) |