title: create class for point coordinates
body: <p>i have following  class with overloading operators</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;algorithm&gt;
  #include&lt;math.h&gt;
  using namespace std;
  class Cvector
  {
  public:
      int x,y;
      Cvector() {  x=0;y=0;}
      Cvector(int,int);
      Cvector operator+(Cvector);
      Cvector operator-(Cvector);
      int  operator*(Cvector);
      bool operator==(Cvector);
      Cvector operator*(int);
      Cvector operator=(Cvector);
  
      int cross_multiplication(Cvector,Cvector);
      float  norm();
  
      };
  Cvector Cvector::operator=(Cvector a)
  {
      x=a.x;
      y=a.y;
      return *this;
  
  }
  bool Cvector::operator==(Cvector b)
  {
      return (x==b.x &amp;&amp; y==b.y);
  
  }
  
  Cvector Cvector::operator*(int c)
  {
      Cvector temp;
      temp.x=c*x;
      temp.y=c*y;
      return temp;
  
  }
  float Cvector::norm()
  {
      float result=0;
      result+=x*x+y*y;;
      return sqrt(result);
  
  
  }
  Cvector::Cvector(int a,int b)
  {
      x=a;
      y=b;
  
  }
  Cvector Cvector::operator+(Cvector a)
  {
      Cvector temp;
      temp.x=x+a.x;
      temp.y=y+a.y;
      return temp;
  
  }
  Cvector Cvector::operator-(Cvector b)
  {
      Cvector temp;
      temp.x=x-b.x;
      temp.y=y-b.y;
      return temp;
  
  }
  int Cvector::operator*(Cvector a)
  {
      return x*a.x+y*a.y;
  
  
  }
  
  int main()
  {
      Cvector a(3,4);
      Cvector b(4,5);
      cout&lt;&lt;b.norm()&lt;&lt;endl;
      Cvector c;
      c=a*b;
      cout&lt;&lt;(a==b)&lt;&lt;endl;
  
      return 0;
  }
  </code></pre>
  
  <p>but it gives me one error</p>
  
  <pre><code>1&gt;c:\users\dato\documents\visual studio 2010\projects\point_class\point_class\point_class.cpp(86): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion)
  1&gt;          c:\users\dato\documents\visual studio 2010\projects\point_class\point_class\point_class.cpp(16): could be 'Cvector Cvector::operator =(Cvector)'
  1&gt;          while trying to match the argument list '(Cvector, int)'
  </code></pre>
  
  <p>please help me to fix this problem</p>