C++ STL Set

#include<iostream>
#include<set>
#include<iterator>
using namespace std;
int main()
{
    set<int>a;
    set<int> :: iterator r;

    a.insert(15);
    a.insert(35);
    a.insert(10);
    a.insert(3);
    a.insert(2);

    for(r=a.begin(); r!= a.end(); r++)
    {
        cout << *r << "\t";
    }

    cout << endl;

    return 0;
}

Comments