Namensräume
Varianten

std::unordered_map::size

Aus cppreference.com

 
 
 
std::unordered_map
Member-Funktionen
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unordered_map::unordered_map
unordered_map::~unordered_map
unordered_map::operator=
unordered_map::get_allocator
Iteratoren
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unordered_map::begin
unordered_map::cbegin
unordered_map::end
unordered_map::cend
Kapazität
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unordered_map::erase
unordered_map::size
unordered_map::max_size
Modifiers
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unordered_map::clear
unordered_map::insert
unordered_map::emplace
unordered_map::emplace_hint
unordered_map::erase
unordered_map::swap
Lookup
Original:
Lookup
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unordered_map::count
unordered_map::find
unordered_map::equal_range
Eimer Schnittstelle
Original:
Bucket interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unordered_map::begin2
unordered_map::end2
unordered_map::bucket_count
unordered_map::max_bucket_count
unordered_map::bucket_size
unordered_map::bucket
Hash Politik
Original:
Hash policy
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unordered_map::load_factor
unordered_map::max_load_factor
unordered_map::rehash
unordered_map::reserve
Beobachter
Original:
Observers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unordered_map::hash_function
unordered_map::key_eq
 
size_type size()const;
(seit C++11)

Returns the number of elements in the container, i.e. std::distance(begin(), end()).

Inhaltsverzeichnis

[Bearbeiten]Parameter

(None)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten]Rückgabewert

die Anzahl der Elemente in dem Behälter
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.

[Bearbeiten]Ausnahmen

noexcept specification:  
noexcept
  (seit C++11)

[Bearbeiten]Komplexität

Constant

[Bearbeiten]Beispiel

The following code uses size to display the number of elements in a std::unordered_map<int>:

#include <unordered_map>#include <iostream>   int main(){std::unordered_map<int, char> nums {{1, 'a'}, {3, 'b'}, {5, 'c'}, {7, 'd'}};   std::cout<<"nums contains "<< nums.size()<<" elements.\n";}

Output:

nums contains 4 elements.

[Bearbeiten]Siehe auch

prüft, ob der Container leer ist
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.

(öffentliche Elementfunktion)[edit]
gibt die maximal mögliche Anzahl von Elementen
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.

(öffentliche Elementfunktion)[edit]
close