title: why do we need a copy constructor when an array is allocated memory dynamically?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4172722/what-is-the-rule-of-three">What is The Rule of Three?</a>  </p>
  </blockquote>
  
  
  
  <pre><code>Array(const Array &amp;arraytoCopy)
  :size(arraytoCopy.size)
  {
      ptr=new int[size];
      for(i=0;i&lt;size;i++)
          ptr[i]=arraytoCopy.ptr[i];
  }
  </code></pre>
  
  <p>what is going to happen if i don't provide a copy constructor.</p>