In the header file:

```
class Point{
    public:
        Point();    // constructor
        Point(double x, double y);  // constructor
        Point(Point& A);    //Copy Constructor
        ~Point();   // destructor

        // below are the operator declarations. 
        Point operator - () const; // Negate the coordinates.

    private:
        double xCord;
        double yCord;

};

```

In the Cpp implementation file, related constructor:

```
Point::Point(double x, double y){   // constructor
    X(x);// void X(double x) is a function to set the xCord 
    Y(y);// so is Y(y)

}

Point Point::operator-() const{ // Negate the coordinates.
    Point temp(-xCord,-yCord);
    return temp;
    // return Point(-xCord,-yCord); // cannot use this one
}

```

It seems that I cannot put a constructor in the return line. It's OK to build one in the code, but if I put it in the return, it will give the following error:

> 
> error: no matching function for call to ‘Point::Point(Point)’
> 
> 
> 

and then the compiler lists all the constructors which I have. But hey, it obviously takes two double arguments, not a Point class. So why is that?

Also I noticed, in sample code given by professor, they were fine:

```
Complex::Complex(double dx, double dy)
{
    x = dx;
    y = dy;
}

Complex Complex::operator - () const
{ 
    return Complex(- x, - y);
}

```