title: Why do we use const and reference for arguments to copy constructors?
body: <p>Consider the following example:</p>
  <pre><code>#include&lt;iostream&gt; 
  using namespace std;
  
  class Point
  {
  private:
      int x, y;
  public:
      Point(int x1, int y1) { x = x1; y = y1; }
  
      // Copy constructor 
      Point(const Point&amp; p2) { x = p2.x; y = p2.y; }
  
      int getX() { return x; }
      int getY() { return y; }
  };
  
  int main()
  {
      Point p1(10, 15); 
      Point p2 = p1; 
  
  
      cout &lt;&lt; &quot;p1.x = &quot; &lt;&lt; p1.getX() &lt;&lt; &quot;, p1.y = &quot; &lt;&lt; p1.getY();
      cout &lt;&lt; &quot;\np2.x = &quot; &lt;&lt; p2.getX() &lt;&lt; &quot;, p2.y = &quot; &lt;&lt; p2.getY();
  
      return 0;
  }
  </code></pre>
  <p>We notice that <code>Point(const Point&amp; p2);</code> is a copy constructor. Why do we use the <code>const</code> keyword, and why do we use a reference? Why don't we use <code>Point(Point p2);</code>?</p>