What I'm missing? (vector search)

struct s
{
int a;
int b;
int c;
};

Suppose to have a filled vector
vector<s> vec;

now let's search an element

s _s;
_s.a=3;
_s.b=5;
_s.c=1;

and here compiler give me a couple of errors
if (std::find(vec.begin(), vec.end(), _s) == vec.end())
// element not found

What I'm missing? I can't understand :(
Last edited on
Did you define the operator== for struct s?
no what I should put inside?

Edit: Ok i understood
Thanks :)
Last edited on
Topic archived. No new replies allowed.