#include <iostream>
#include <set>
using namespace std;
void print (set<int, less<int> >& s)
{
set<int, less<int> >::iterator It;
for ( It = s.begin(); It != s.end(); It++ )
cout << *It << " ";
cout << endl;
}
//--------------------------------------------
int main ()
{
int ary[] = {1,2,3,2,3,4,8,2,5,6};
set<int, less<int> > s;
s.insert(ary,ary+10);
print(s);
cout << "count of '2' (0 or 1) is ";
int n = s.count(100);
cout << n << endl;
getchar();
return 0;
}