how to proper delete pointer to array
<p>I'm new to C++, and im confused about arrays and pointer. Could someone tell me how can i properly delete a pointer. Like for example,</p>

<pre><code>int *foo;
foo = new int[10];

delete foo;
</code></pre>

<p>or</p>

<pre><code>delete [] foo;
</code></pre>

<p>Thanks.</p>
