title: Converting multidimensional arrays to pointers in c++
body: <p>I have a program that looks like the following:</p>
  
  <pre><code>double[4][4] startMatrix;
  double[4][4] inverseMatrix;
  initialize(startMatrix) //this puts the information I want in startMatrix
  </code></pre>
  
  <p>I now want to calculate the inverse of startMatrix and put it into inverseMatrix. I have a library function for this purpose whose prototype is the following:</p>
  
  <pre><code>void MatrixInversion(double** A, int order, double** B)
  </code></pre>
  
  <p>that takes the inverse of A and puts it in B. The problem is that I need to know how to convert the double[4][4] into a double** to give to the function. I've tried just doing it the "obvious way":</p>
  
  <pre><code>MatrixInversion((double**)startMatrix, 4, (double**)inverseMatrix))
  </code></pre>
  
  <p>but that doesn't seem to work. Is that actually the right way to do it?</p>