Not sure what's wrong with the first one, but the ternary operator isn't necessary in either of your examples. booloperator==(const point_t &p) {return (x == p.x && y == p.y);}
Neither of your implementations will be any use. In the second one, you're returning a reference to a local variable. But when the function exits, that local variable no longer exists, so the reference is garbage.
In the first case, you're attempting to return a non-const reference to something that isn't an lvalue. That's illegal.