title: Extract rows/columns from ** matrices in C/C++
body: <p>I have a square matrix <code>double **A</code></p>
  
  <p>I know how to iterate through this matrix:</p>
  
  <pre><code>for (int i = 0; i &lt; MATRIX_SIZE; i++) {
   for (int j = 0; j &lt; MATRIX_SIZE; j ++) {
     int val = A[i][j];
     printf("val: %d\n", val);
   }
  }
  </code></pre>
  
  <p>However, I'm wondering how I can assign an entire row or column to a variable given I have this <code>**</code> matrix (The <code>**</code> pointer to pointer nonsense is still a little confusing. I believe its saying a list of list of doubles).</p>
  
  <p>To add a little more background, I'm trying to extract rows and columns so I can perform a <code>cuda</code> matrix multiplication. I see a lot of documentation online that uses one-dimensional vectors to represent matrices (i.e. <code>double* A</code>) However, I am getting confused with the <code>**</code> </p>