// Example of operator overloading // http://www.cplusplus.com/doc/tutorial/templates/ #include using namespace std; class cVec { public: float x, y; cVec () {}; // Why do we need to keep this line? // cVec (int a,int b) : x(a), y(b) {} // Constructor with member initialization cVec (int a,int b) {x=a; y=b;} cVec operator+(const cVec&); cVec operator-(const cVec&); cVec operator*(const cVec&); cVec operator/(const cVec&); void print(){cout<<"["<