Structure Reference and Dereference Operators
<p>Suppose I define this structure:</p>

<pre><code>struct Point {
   double x, y;
};
</code></pre>

<p>Now, suppose I create a dynamic array of this type:</p>

<pre><code>Point *P = new Point[10];
</code></pre>

<p>Why do I use <code>P[k].x</code> and <code>P[k].y</code> instead of <code>P[k]-&gt;x</code> and <code>P[k]-&gt;y</code> to access the <code>k</code>-th point's elements?</p>

<p>I thought you had to use the latter for pointers.</p>
