title: what's the difference between Class(const Class & c) and Class(Class & c)?
body: <p>I want to know the difference between the <code>Class(const Class &amp; c)</code> constructor and the <code>Class(Class &amp; c)</code> constructor in C++.</p>
  
  <pre><code>class Class
  {
  public:
      Class()
      {
         cout &lt;&lt; "running Class()..." &lt;&lt; endl;
      }
      Class(Class&amp; c)
      {
          cout &lt;&lt; "running Class(Class&amp; c)..." &lt;&lt; endl;
      }
      Class(const Class&amp; c)
      {
          cout &lt;&lt; "runing Class(const Class&amp; c)..." &lt;&lt; endl;
      }
  };
  </code></pre>
  
  <p><code>Class</code> is defined as above.</p>
  
  <p>I know that <code>Class(const Class&amp; c)</code> is a copy constructor. It will be called when new Class object is created. For example:</p>
  
  <pre><code>Class c;  // output-&gt;running Class()...
  Class cc(c); // output-&gt;runing Class(const Class&amp; c)...
  </code></pre>
  
  <p>Now, I want to know  when the <code>Class(Class&amp; c)</code> constructor will be called.</p>