error: cannot convert ‘array_type {aka boost::multi_array}’ to ‘double (*)[2]’
<p>I am practicing c++ and using boost library for the first time.
I have this program for solving a differential equation:</p>

<pre><code>double rk2(double(*)[2], double, double, double, double(*)[2], double);
int main()
{// Create a 2D array that is n X 2
  typedef boost::multi_array&lt;double, 2&gt; array_type;
  typedef array_type::index index;
  array_type a(boost::extents[n][2]);

 // Create a 2D array that is n X 2
  typedef boost::multi_array&lt;double, 2&gt; array_type;
 typedef array_type::index index;
  array_type v(boost::extents[n][2]);
</code></pre>

<p>Then I have some conditions followed by..</p>

<pre><code> while 
{ (....some condition...)
       tf = ti + dt;
       vf = rk2(a,ti,vi,tf, v, xi);
       xi = vf*dt+xi;
}
 return 0;
}
</code></pre>

<p>then I define my function</p>

<pre><code>double rk2(double a[10000][2], double ti, double vi, double tf, double v[10000][2], double xi)
{ ....lines..
return vf;
}
</code></pre>

<p>I'm getting an error message saying:</p>

<pre><code> error: cannot convert ‘array_type {aka boost::multi_array&lt;double,&gt;}’ to ‘double (*)[2]’ for argument ‘1’ to ‘double rk2(double (*)[2], double, double, double, double (*)[2], double)’
</code></pre>

<p>Help me please !</p>

<p>-TY-</p>
