title: The difference between delete and delete[] in C++
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2425728/delete-vs-delete-operators-in-c">delete vs delete[] operators in C++</a>  </p>
  </blockquote>
  
  
  
  <p>I've written a class that contains two pointers, one is <code>char* color_</code> and one in <code>vertexesset* vertex_</code> where <code>vertexesset</code> is a class I created. In the destractor I've written at start</p>
  
  <pre><code>delete [] color_;
  delete [] vertex_;
  </code></pre>
  
  <p>When It came to the destructor it gave me a segmentation fault.</p>
  
  <p>Then I changed the destructor to:</p>
  
  <pre><code>delete [] color_;
  delete vertex_;
  </code></pre>
  
  <p>And now it works fine. What is the difference between the two?</p>