set
#include <iostream>
#include <set>
using namespace std;
int main() {
int sz[9] = { 1,3,4,1,1,1,1,1,1};
set<int> A(sz, sz + 9);
set<int>::iterator se = A.begin();
cout << "sets elem numbers: " << A.size() << endl;
while (se!=A.end())
{
cout << *se << " ";
++se;
}
system("pause");
return 0;
}
multiset
#include <iostream>
#include <set>
using namespace std;
int main() {
int sz[9] = { 1,3,4,1,1,1,1,1,1};
multiset<int> A(sz, sz + 9);
set<int>::iterator se = A.begin();
cout << "sets elem numbers: " << A.size() << endl;
while (se!=A.end())
{
cout << *se << " ";
++se;
}
system("pause");
return 0;
}