Do I need to use the new operator in C++
<p>what is the difference between the following block of code :</p>

<pre><code>#include&lt;iostream&gt;
using namespace std;
int main()
{
    int *p;
    float *q;
    cout&lt;&lt;p&lt;&lt;"\n"&lt;&lt;q;
}
</code></pre>

<p>and this code :</p>

<pre><code>#include&lt;iostream&gt;
using namespace std;
int main()
{
    int *p;
    float *q;
    p = new int;
    q = new float;
    cout&lt;&lt;p&lt;&lt;"\n"&lt;&lt;q;
}
</code></pre>

<p>In both the cases the pointers are allocated some memory right?</p>

<p>Then why should i use the new operator?</p>
