I'm trying to create a method in c++, where, when implemented would look like

```
pointA.distanceTo(pointB)

```

However, I'm having trouble trying to incorporate "pointA" into the method. Currently, my code for the method looks like this:

```
double Point::distanceTo(Point p1)
{
    double xDist=getxCoord()-???;
    double yDist=getyCoord()-???;
    return sqrt(xDist*xDist-yDist*yDist);
}

```

I know that the getxCoord() and getyCoord() methods will only get the object inside the parenthesis of distanceTo(Point p1).

But I have no clue how to get the object info from pointA in "pointA.distanceTo(pointB)".