why does stl sort’s comparer use a reference to non static member

  c++, stl
bool comparer(const vector<int> i1,const vector<int> i2)
{
    return (i1[0]+i1[1] <= i2[0]+i2[1]);
}
sort(vect.begin(),vect.end(),comparer);

here vect is vector<vector> vect;
so, when iam using stl sort
it is saying that error has been generated saying that "reference to non static member must be called"

Source: Windows Questions C++

LEAVE A COMMENT