Array Pointer in C++
<pre><code>int n;
int *array[8]
cout&lt;&lt;"Enter Number Between 0-9 Only"&lt;&lt;endl;
for(int i = 0; i&lt; 9; i++){
    cout &lt;&lt; "Enter Number " &lt;&lt; (i + 1) &lt;&lt; endl;
    cin &gt;&gt; n;
    if((n &gt;= 0) &amp;&amp; (n &lt;= 9))
        array[i] = &amp;n;
    else {
        cout &lt;&lt; "Numbers from 0-9 only\n" &lt;&lt; endl;
        i--;
    }

}
cout &lt;&lt; *array[0] &lt;&lt; endl;
}
</code></pre>

<p>I'm trying to store 9 entered numbers in a pointer array but its not working why?? Can you explain why to me and how to solve it or improve it. I'm just a beginner and its not homework im testing what i had read.</p>
