最終更新日時(UTC): 2019年03月19日 01時29分20秒 alphya が更新
履歴 編集
size_type size() const noexcept;
コンテナ内の要素の数を返す。
multiset コンテナに格納されている要素の数を返す。 メンバ型 size_type は符号なし整数型である。
multiset
size_type
定数時間
#include <iostream> #include <set> int main () { std::multiset<int> c; std::cout << c.size() << std::endl; c.insert(1); c.insert(2); c.insert(3); c.insert(1); std::cout << c.size() << std::endl; }
0 4
max_size
empty