OVERLOADING OPERATORS = error
<p>I am trying to use overloading concept to equate 3 objects <code>c1</code>, <code>c2</code>, <code>c3</code>.
But it is giving me an error </p>

<pre><code>error: no match for 'operator=' in 'c3 = c2. circle::operator=(((circle&amp;)(&amp; c1)))'
</code></pre>

<p>What's the reason behind it how do I rectify it??</p>

<pre><code>#include&lt;iostream&gt;
using namespace std;

class circle
{
  private:
    int radius;
    float x,y;
  public:
    circle()
    {}
    circle(int rr,float xx,float yy)
    {
      radius=rr;
      x=xx;
      y=yy;
    }
    circle&amp; operator=(const circle&amp; c)
    {
     cout&lt;&lt;endl&lt;&lt;"assignment operator invoked";  
     radius=c.radius;
     x=c.x;
     y=c.y;
     return *this;
     }
    void showdata()
    {
      cout&lt;&lt;endl&lt;&lt;"\n radius="&lt;&lt;radius;
      cout&lt;&lt;endl&lt;&lt;"x coordinate="&lt;&lt;x;
      cout&lt;&lt;endl&lt;&lt;"y coordinate="&lt;&lt;y&lt;&lt;endl;
    }
};
int main()
{
  circle c1 (10,2.5,2.5);
  circle c2,c3;
  c3=c2=c1;
  c1.showdata();
  c2.showdata();
  c3.showdata();
  return 0;
} 
</code></pre>

<p>so this overloaded operator will be called two times..
First for c2=c1
and then for c3=c2 but how will compiler compare it with overloaded operator definition??</p>
