title: assignment operator overloading in c++
body: <p>I have used the following code for assignment operator overloading:</p>
  
  <pre><code>SimpleCircle SimpleCircle::operator=(const SimpleCircle &amp; rhs)
  {
       if(this == &amp;rhs)
          return *this;
       itsRadius = rhs.getRadius();
       return *this;
  }
  </code></pre>
  
  <p>My Copy Constructor is this:</p>
  
  <pre><code>SimpleCircle::SimpleCircle(const SimpleCircle &amp; rhs)
  {
      itsRadius = rhs.getRadius();
  }
  </code></pre>
  
  <p>In the above operator overloading code, copy constructor is called as there is a new object is being created; hence I used the below code:</p>
  
  <pre><code>SimpleCircle &amp; SimpleCircle::operator=(const SimpleCircle &amp; rhs)
  {
      if(this == &amp;rhs)
         return *this;
      itsRadius = rhs.getRadius();
      return *this;
  }
  </code></pre>
  
  <p>Its working perfectly and the copy constructor problem is avoided, but is there any unknown issues (to me) regarding this ?</p>