#include <iostream>


//vector math
class victor{
public:
	float vx, vy;
	victor()
	{
		vx = vy = 0;
	}
	victor(float a, float b)
	{
		vx = a;
		vy = b;
	}
	victor(victor * a)
	{
		vx = a->vx;
		vy = a->vy;
	}
	victor(victor & a)
	{
		vx = a.vx;
		vy = a.vy;
	}	
	virtual float x()
	{
		return vx;
	}
	virtual float y()
	{
		return vy;
	}
};

class add:victor{
	victor *a,*b;
public:
	add(victor *_a, victor *_b)
	{
		a = _a;
		b = _b;
	}
	add(victor &_a, victor &_b)
	{
		a = &_a;
		b = &_b;
	}
	float x()
	{
		return a->x() + b->x();
	}
	float y()
	{
		return a->y() + b->y();
	}
};

//stack
class stack{
public:
	stack * back;
	virtual int operator() (int n)
	{
		return 0;
	}
	virtual int operator() ()
	{
		return 0;
	}
};
class push:stack{
public:
	int num;
	push(int n)
	{
		num = n;
		back = 0;
	}
	push(int n, stack * last)
	{
	}
	
};


//test

using namespace std;

int main()
{
	int t[5];
	t [1] = 2;
	int * p = &t[0];
	cout << *(p + 1) << " " << t[1] << endl;
	victor a(2,2);
	victor b(3,3);
	//add c(&a,&b);
	add c(a,b);
	cout << c.x() << " " << c.y() << endl;
	return 0;
}
