In C++, why should I use "new" if I can directly assign an integer to the pointer without using "new"? : <p>Assuming my pointer is not pointing to an array, how is this block:</p>

<pre><code>int *ptr_a;

ptr_a = new int;
*ptr_a = 1;
</code></pre>

<p>different compared with:</p>

<pre><code>int *ptr_a = 1;
</code></pre>

<p>Is there a difference in memory allocation and when would I use one over the other?</p>
