title: Remove one dynamic object from a dynamic array
body: <p>I have a dynamic array (For this example, SIZE = 2):</p>
  
  <pre><code>polyTerm** polyn = new polyTerm* [SIZE];
  </code></pre>
  
  <p>I then add a few new ponlyTerm object to the array:</p>
  
  <pre><code>polyn[0] = new polyTerm(5.0,1);
  polyn[1] = new polyTerm(2.0,1);
  </code></pre>
  
  <p>Now I want to remove the object from slot 0 and make the pointer null. How would I go about doing this? I currently have:</p>
  
  <pre><code>delete &amp;polyn[0];
  </code></pre>
  
  <p>Then I use:</p>
  
  <pre><code>polyn[0] = NULL;
  </code></pre>
  
  <p>To make the pointer null.</p>
  
  <p>Will this work? </p>
  
  <p>EDIT:
  Correction, I need to use <code>delete polyn[0]</code> - even so, setting that to NULL should affect the pointer, as it would still technically point to the original location of the object. Resetting it to NULL removes any errors that could pop up later.</p>