iterator end();const_iterator end() const;
iterator end() noexcept;const_iterator end() const noexcept;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// multiset::begin/end
#include <iostream>
#include <set>
int main ()
{
int myints[] = {15,98,77,77,39};
std::multiset<int> mymultiset (myints,myints+5);
std::cout << "mymultiset contains:";
for (std::multiset<int>::iterator it=mymultiset.begin(); it!=mymultiset.end(); ++it )
std::cout << ' ' << *it;
std::cout << '\n';
return 0;
}
mymultiset contains: 15 39 77 77 98