need a cast syntax to access an old c api
<p>I'm trying to write a glue function between two data types and I can't seem to get the compiler to be happy.  On one side, I have a pointer to a chunk of data that is logically a n x 2 array, but is declared as:</p>

<pre><code>double* pData=new double[2*n];
</code></pre>

<p>On the other side, I have a c function that is declared as</p>

<pre><code>void Function(double data[][2], int n);
</code></pre>

<p>If I remember my c syntax, the data[][2] is really just a pointer to a contiguous chunk of memory, but the compiler knows the size of the second dimension is 2.  So I'd like to take pData and pass it into Function(), without a memcpy.  I just can't seem to write the cast.  I thought something like</p>

<pre><code>Function((double [][2])pData,n)
</code></pre>

<p>would work, but the compiler (MSVC 8) doesn't like that.  Can anyone let me know the proper way to write the cast to get the compiler to be happy.</p>
