title: How to create function with input is 2D array in C++
body: <p>I have a 2D array that defined as</p>
  
  <pre><code>int P[5][10];
  for (int i=0;i&lt;N;i++)
  {
      for(int j=0;j&lt;L;j++)
      {
          if(random()&gt;0.5)
              P[i][j]=1;
          else
              P[i][j]=0;
      }
  }
  </code></pre>
  
  <p>I want to make a function with input is P. The function allows us show the value of P. How to defined that function. I tried such as </p>
  
  <pre><code>void show_P(int P[][], int numcols,int numrows)
  </code></pre>
  
  <p>However, it is wrong. Could you help me fix it? Thanks</p>