Couldn't resolve the error

sir in the following code i m getting this error:
Line 33: Char 32: error: reference to non-static member function must be called
sort(v.begin(),v.end(),compare);

code:

pls help!!

when u write vector v(n)
it decalres a vector of size n already with garbage values, now again when u r pushing back i to it it is pushing further values in
this creates an anamoly in the compiler


understand this in this chunk of code


read this