Homework help regarding dynamically allocated arrays and pointers
<p>Here's my question:</p>

<p>Suppose your program contains code to create a dynamically allocated array as follows:</p>

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

<p>so that the pointer variable entry is pointing to this dynamically allocated array. Write code to fill this array with ten numbers typed in at the keyboard.</p>

<p>I've gone through the book for two days now and still can't figure this out. </p>

<p>Here's the code I was trying, but it is giving me an error on line 17 that says: No operator matches these operands "&lt;&lt;". I've checked the msdn and a couple other websites, but I cant figure this out. Any help would be appreciated.</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main()
{
int * entry;
entry = new int [10];
int array_size = 10;
int num;
for(int i = 0; i&lt; array_size; i++)
    entry[i] = i;

for(int i = 0; i &lt; array_size; i++)
{
    cout &lt;&lt; "Enter an int into the array: " &lt;&lt; endl;
    cin &lt;&lt; entry[i] &lt;&lt; endl;
}


return 0;
}
</code></pre>
