passing a pointer to float in array to a function accepting fixed size arrays
<p>I have a number of functions that have the following form:</p>

<pre><code>typedef float arr3[3];
float newDistanceToLine(arr3 &amp;p0, arr3 &amp;p1, arr3 &amp;p2);
</code></pre>

<p>and now find convenient to store lots of points into a long array:</p>

<pre><code>int n_points = 14;
float *points;
points = new float[3*n_points];
</code></pre>

<p>Is there a way to pass pointers to different values of the array "points" to my functions accepting fixed size arrays? I know that the following fails, but, I would like to do something like:</p>

<pre><code>newDistanceToLine(&amp;points[3], &amp;points[6], &amp;points[9]);
</code></pre>

<p>or get any help on how best to reuse my code.</p>

<p>Thanks!</p>