// Vector.cpp: implementation of the CVector class. // ////////////////////////////////////////////////////////////////////// #include "Vector.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CVector::CVector() { x = 0; y = 0; } CVector::~CVector() { } CVector::CVector(int xs, int ys) { x = xs; y = ys; } CVector::CVector(CVector &old) { this->x = old.x; this->y = old.y; } int CVector::GetX() { return x; } int CVector::GetY() { return y; } void CVector::SetX(int sx) { x = sx; } void CVector::SetY(int sy) { y = sy; } //void CVector::operator+ (const CVector &vect) //{ //this->x = vect.GetX(); //this->y = vect.GetY(); //return this; //} void CVector::operator =(const CVector &vect) { x = vect.x; y = vect.y; // return this; } CVector CVector::operator *(int mult) { return CVector(mult * this->x, mult * this->y); }