title: How do I pass a reference to a two-dimensional array to a function?
body: <p>I am trying to pass a reference to a two-dimensional array to a function in C++. I know the size of both dimensions at compile time. Here is what I have right now:</p>
  
  <pre><code>const int board_width = 80;
  const int board_height = 80;
  void do_something(int[board_width][board_height]&amp; array);  //function prototype
  </code></pre>
  
  <p>But this doesn't work. I get this error from g++:</p>
  
  <pre><code>error: expected ‘,’ or ‘...’ before ‘*’ token
  </code></pre>
  
  <p>What does this error mean, and how can I fix it?</p>