名前空間
変種
操作

std::multiset::size

提供: cppreference.com
< cpp‎ | container‎ | multiset

 
 
 
std::multiset
メンバ関数
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.
multiset::multiset
multiset::~multiset
multiset::operator=
multiset::get_allocator
イテレータ
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
multiset::begin
multiset::cbegin

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

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

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

(C++11)
容量
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
multiset::empty
multiset::size
multiset::max_size
修飾子
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
multiset::clear
multiset::insert
multiset::emplace(C++11)
multiset::emplace_hint(C++11)
multiset::erase
multiset::swap
ルック
Original:
Lookup
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
multiset::count
multiset::find
multiset::equal_range
multiset::lower_bound
multiset::upper_bound
オブザーバー
Original:
Observers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
multiset::key_comp
multiset::value_comp
 
size_type size() const;

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

目次

[編集] パラメータ

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

[編集] 値を返します

コンテナ内の要素の数
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.

[編集] 例外

noexcept specification:  
noexcept
  (C + + 11以来)

[編集] 複雑

Constant

[編集]

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

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

Output:

nums contains 4 elements.

[編集] も参照してください

コンテナが空であるかどうかをチェックします
(パブリックメンバ関数) [edit]
要素の最大数を返します
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.

(パブリックメンバ関数) [edit]