title: Passing multidimensional array to a function C
body: <p>I'm having problems passing a multidimensional array to a function in C.  Both in the typedef and what the argument should be.</p>
  
  <p>Currently, my function def looks like this:</p>
  
  <pre><code>int foo(char *a, char b[][7], int first_dimension_of_array);
  </code></pre>
  
  <p>I declare an array like this:</p>
  
  <pre><code>char multi_D_array[20][7];
  </code></pre>
  
  <p>When I try to call the function like this:</p>
  
  <pre><code>foo(d, multi_D_array, 20);
  </code></pre>
  
  <p>I get the warning that the second argument to the function is from incompatible pointer type.  I've tried many of the variations that I've seen online but still can't get it correct.  Also, when using GDB, I find that only the first array of the 2D array is passed in.  Feedback on what I'm doing wrong would be greatly appreciated. </p>