std::set::size
提供:cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| 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.
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.
You can help to correct and verify the translation. Click here for instructions.
[編集] 例外
[編集] 複雑
Constant
[編集] 例
The following code uses size to display the number of elements in a std::set<int>:
Output:
nums contains 4 elements.
[編集] も参照してください
| コンテナが空であるかどうかをチェックします (パブリックメンバ関数) | |
| 要素の最大数を返します 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. (パブリックメンバ関数) | |