title: Pass a 2D char array to a function in C
body: <p>I'm a beginning programmer who is confused with passing a two dimensional array to a function. I think it may just be a simple syntax problem. I've looked for an answer, but nothing I've found seems to help, or is too far above my level for me to understand.</p>
  
  <p>I identify the array and the function in the main function as, and after initializing it, attempt to call it:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdbool.h&gt;
  
  int const ROWS = 8;
  int const COLS = 8;
  
  int main(int argc, char** argv) {
  
  char board[ROWS][COLS];
  
  bool canReach(char board[][], int i, int j);
  
  //initialize array
  
  //values of i and j given in a for loop
  
  canReach(board, i, j);
  
  return (EXIT_SUCCESS);
  }
  </code></pre>
  
  <p>While writing the function outside the main function, I defined it exactly the same as I did in the main function.</p>
  
  <pre><code>bool canReach(char board[][], int i, int j){
  //Functions purpose
  }
  </code></pre>
  
  <p>When I attempt to build the program, I'm given this error twice and the program does not build:</p>
  
  <pre><code>error: array has incomplete element type 'char[][]'
  bool canReach(char board[][], int i, int j)
                          ^
  </code></pre>
  
  <p>Please note that I'm trying to pass the entire array to the function, and not just a single value. What can I do to fix this problem? I would appreciate it if it didn't have to use pointers, as I find them quite confusing. Also, I've tried to leave out things that I thought weren't important, but I may have missed something I needed, or kept in things I didn't. Thank you for your time in helping out this starting programmer!</p>