title: Argument of type int(*)[] is incompatible with parameter of type "int**"
body: <p>I was creating a function that would give me random values of a matrix. I know how to make it in the <code>main</code> function but I want a separate one. I also tried with <code>void</code> and the same thing happened, and I keep getting the same error. I am beginner and I understand that the issue is something to do with pointers but I still don't know what should I do to make it work and fix it. I already Googled it but I can't make this work.</p>
  <pre><code>#include&lt;stdlib.h&gt;
  #include&lt;iostream&gt; 
  #include&lt;time.h&gt;
  
  int row, coll;
  
  int random(int *mat[])
  {
      srand(time(0));
      for(int i=0; i&lt;row; i++)
      {
          for(int j=0; j&lt;coll; j++)
          {
              mat[i][j] = rand()%10;
          }
      }
  
  }
  
  main()
  {
      std::cin &gt;&gt; row &gt;&gt; coll;
      int mat[row][coll];
      random(mat);
  } 
  </code></pre>