My list contains pointers, not the actual objects. How to sort this?

Code:
// compiler error generated on this class because it does not
// have a class-specific parameter.
int operator<(MyClass*n1, MyClass*n2)
{
 return n1->x < n2->x;
}


// If I define it like this, no compiler errors but it is never called.
int operator<(MyClass& n1, MyClass& n2)
{
 return n1.x < n2.x;
}

list<MyClass*> theList;

MyClass *item = new MyClass;
theList.push_back(item);
item = new MyClass;
theList.push_back(item);
// etc. etc for the remaining items

// now sort the list

theList.Sort(); // error

After the above unsuccessful attempts to sort the list, I tried to use the second form of list::sort, which has a parameter. I THINK the parameter is to a comparison function. but that doesn't work either
Code:
int compare(MyClass*n1, MyClass*n2)
{
 return n1.x < n2.x;
}

// next line produces compile error
theList.sort(compare);
So, how to sort a list of pointers??????

Thanks