I have following code:
#include <vector>
using namespace std;
struct Point
{
int x, y;
};
bool Sort(struct Point& a,struct Point& b){
return a.x<b.x;
}
int main(int argc, char *argv[])
{
vector<Point>a;
for (int i=0;i<10;i++){
cin>>a[i].x>>a[i].y;
}
sort(a,10,Sort);
system("PAUSE");
return EXIT_SUCCESS;
}
but it seems wrong. Can you please tell me the correct form of the sort function to use?