Suppose I wrote a class in c++ like this:
class data
{
private:
int a,b,c,d;
public:
data(){
a=b=c=d=0;
}
data(int aa,int bb, int cc, int dd)
{
a=aa,b=bb,c=cc,d=dd;
}
int get_b(){return b;}
int get_a(){return a;}
};
Now I know want to learn how to write operators and iterators for this class so that it can be used with standard library containers
Like: set<string> x;
this is possible. I want to use this data class as set<data> x;
and want to use iterators like set<data>::iterator it;
I have tried to google out the procedure, but nowhere could find an example implementation which would actually explain the procedure.