Hello, I would like to compare two objects through their addresses. I tried operator overloading and it does not seem to work for pointers, but works for objects themselves. The following is the relevant code:
class C {
public:
int x;
};
.
.
.
bool operator <( C *ptr_c1, C *ptr_c2 )
{
return ( (*ptr_c1).x < (*ptr_c2).x );
}