Espaços nominais
Variantes
Acções

std::deque::size

Da cppreference.com
< cpp‎ | container‎ | deque
Revisão das 08h26min de 2 de julho de 2013 por P12bot (discussão | contribs)

(dif) ← Revisão anterior | Revisão actual (dif) | Revisão seguinte → (dif)

 
 
 
std :: deque
Funções de membro
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.
deque::deque
deque::~deque
deque::operator=
deque::assign
deque::get_allocator
acesso. Elemento
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::front
deque::back
Iteradores
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::begin
deque::cbegin

(C++11)
deque::end
deque::cend

(C++11)
deque::rbegin
deque::crbegin

(C++11)
deque::rend
deque::crend

(C++11)
Capacidade
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::empty
deque::size
deque::max_size
deque::shrink_to_fit
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::clear
deque::insert
deque::emplace
deque::erase
deque::push_front
deque::emplace_front
deque::pop_front
deque::push_back
deque::emplace_back
deque::pop_back
deque::resize
deque::swap
 
size_type size() const;

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

Índice

[editar] Parâmetros

(Nenhum)
Original:
(none)
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

o número de elementos no recipiente
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.

[editar] Exceções

noexcept specification:  
noexcept
  (desde C++11)

[editar] Complexidade

Constant

[editar] Exemplo

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

#include <deque>
#include <iostream>
 
int main()
{
    std::deque<int> nums {1, 3, 5, 7};
 
    std::cout << "nums contains " << nums.size() << " elements.\n";
}

Saída:

nums contains 4 elements.

[editar] Veja também

verifica se o recipiente estiver vazio
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.

(função pública membro) [edit]
retorna o número máximo possível de elementos
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.

(função pública membro) [edit]
changes the number of elements stored
(função pública membro) [edit]