Question: I'm Confused about a topic regarding operator overloading. See the following code:

```
#include <iostream>;

class Vectors {
public:
    int x, y;
    Vectors() {};
    Vectors(int a,int b) {
        x = a, y = b;
    }
    Vectors operator+(Vectors aso) {
        Vectors brandNew;
        std::cout << "ASO X " << aso.x << std::endl;
        std::cout << "ASO Y " << aso.y << std::endl;
        brandNew.x = brandNew.x + aso.x;
        brandNew.y = brandNew.y + aso.y;
        return (brandNew);
    };
};
int main() {
    Vectors v1(2,3);
    Vectors v2(4,5);
    Vectors v3;
    v3 = v1 + v2;

    std::cout << "Vector V3 X : " << v3.x << std::endl;
    std::cout << "VECTOR V3 Y : " << v3.y << std::endl;
}

```

When I print aso.x, it y gives me 4 and 5. What I want to do is add both v1 and v2; meaning the x of v1 and v2, and the y of v1 and v2. Then, pass it into a Vectors object and return that object.

How do I accomplish that, given what I have above?

Answer: 
You can also use external operator+ :

```
class Vectors {
public:
    int x, y;
    Vectors() {};
    Vectors(int a,int b) {
        x = a, y = b;
    }

    friend Vectors operator+(const Vectors& v1, const Vectors& v2);
};

Vectors operator+(const Vectors& v1, const Vectors& v2) {
        Vectors brandNew;
        brandNew.x = v1.x + v2.x;
        brandNew.y = v1.y + v2.y;
        return (brandNew);
    };

int main() {
    Vectors v1(2,3);
    Vectors v2(4,5);
    Vectors v3;
    v3 = v1 + v2;

    std::cout << "Vector V3 X : " << v3.x << std::endl;
    std::cout << "VECTOR V3 Y : " << v3.y << std::endl;
}

```
Your code creates the new `Vectors` object `brandNew` and then adds the values of it which are initialised to 0 to the values inside the `Vectors` object you passed in instead of the values in the current object. Which is why when you add `v1` to`v2` the result has the same values as those inside `v2`.

Replace

```
brandNew.x = brandNew.x + aso.x;
brandNew.y = brandNew.y + aso.y;

```

with

```
brandNew.x = x + aso.x;
brandNew.y = y + aso.y;

```