c++: I want 2, 4, 6 to display... instead I think address numbers are displaying?
<p>I want 2, 4, 6 to display... instead I think address numbers are displaying?  </p>

<p>What do I need to do to correct and why?
Thanks</p>

<p>(purpose... to demonstrate ability to change array space and still keep the base of the array) </p>

<pre><code>    int *line;

    line = new int;
    line[0] = 2;
    line = new int;
    line[1] = 4;
    line = new int;
    line[2] = 6;
    line = new int;
    printf("%d  %d  %d", line[0], line[1], line[2]);
</code></pre>
