// vectors: overloading operators example
#include <iostream>
using namespace std;
class Vector 
{
private :
	int x,y;
public: 
    Vector (void) ;
    Vector (int,int);
	~Vector (void);
    Vector operator + (Vector);
	int getX(void);
	int getY(void);
};
Vector::Vector(void)
{
}
Vector::Vector (int a, int b) 
{
  x = a;
  y = b;
}
Vector :: ~Vector(void)
{
}
Vector Vector::operator + (Vector myVector) 
{
  Vector temp;
  temp.x = x + myVector.x;
  temp.y = y + myVector.y;
  return (temp);
}
int Vector:: getX(void)
{
	return (x);
}
int Vector:: getY(void)
{
	return (y);
}
void main (void) 
{
	int points[2][2];
	cout<< "enter x coordinate of point 1 : ";
	cin >> points[0][0];
	cout<< "enter y coordinate of point 1 : ";
	cin >> points[0][1];
	cout<< "enter x coordinate of point 2 : ";
	cin >> points[1][0];
	cout<< "enter y coordinate of point 2 : ";
	cin >> points[1][1];
	Vector a (points[0][0],points[0][1]);
	Vector b (points[1][0],points[1][1]);
	Vector c;
	c = a + b;
	int x = 1 + 2;
	cout << x << endl;
	cout << "The sum of these vectors is " << c.getX() << " , " << c.getY()<< endl;
}


