I have a class, the constructor looks like this:
myclass(int=0,string="",int=0,string="",int=0,int=0,
int=0,int=0,string="",int=0,int=0);
and a vector with elements of this type
vector<myclass>myvect;
the vector is sorted and I am trying to remove duplicates and this is not working:
std::vector<myclass>::iterator it;
it=std::unique (myvect.begin(), myvect.end());
myvect.resize(std::distance(myvect.begin(),it) );
I get this error
:algorithm(1862): error C2678: binary '==' :
no operator found which takes a left-hand operand
of type 'myclass' (or there is no acceptable conversion)
any idea why? is there any way I can remove duplicates from this vector?