Fellow C++ programmer needs some help
<pre><code> // rememb-o-matic
 #include &lt;iostream&gt;
 #include &lt;new&gt;
 using namespace std;

 int main ()

 {
   int i,n;
   int * p;
   cout &lt;&lt; "How many numbers would you like to type? ";
   cin &gt;&gt; i;
   p= new (nothrow) int [i];
   if (p == 0)
     cout &lt;&lt; "Error: memory could not be allocated";
   else
   {
     for (n=0; n&lt;i; n++)
     {
       cout &lt;&lt; "Enter number: ";
       cin &gt;&gt; p[n];
     }
     cout &lt;&lt; "You have entered: ";
     for (n=0; n&lt;i; n++)
       cout &lt;&lt; p[n] &lt;&lt; ", ";
     delete[] p;
   }
   return 0;
 }
</code></pre>

<p>Now,</p>

<p>why is their a bracket enclosed in variable i?</p>

<pre><code> p= new (nothrow) int [i];
</code></pre>

<p>why are their 2 <code>for</code> statements and what does a <code>for</code> statement do exactly?</p>

<p>Why is it deleting []p instead of the variable <code>p</code>?</p>
