title: Passing a matrix in a function (C)
body: <p>I have an issue passing a matrix to a function in C. There is the function I want to create:</p>
  
  <pre><code>void ins (int *matrix, int row, int column);
  </code></pre>
  
  <p>but I noticed that in contrast to the vectors, matrix give me an error. How can I pass my matrix to a function so?</p>
  
  <p>EDIT --> there is the code:</p>
  
  <pre><code>// Matrix
  
  #include &lt;stdio.h&gt;
  #define SIZE 100
  
  void ins (int *matrix, int row, int column);
  void print (int *matrix, int row, int column);
  
  int main ()
  {
      int mat[SIZE][SIZE];
      int row, col;
  
      printf("Input rows: ");
      scanf  ("%d", &amp;row);
      printf("Input columns: ");
      scanf  ("%d", &amp;col);
  
      printf ("Input data: \n");
      ins(mat, row, col);
  
      printf ("You entered: ");
      print(mat, row, col);
  
      return 0;
  }
  
  void ins (int *matrix, int row, int column);
  {
      int i, j;
  
      for (i = 0; i &lt; row; i++)
      {
          for (j = 0; j &lt; column; j++)
          {
              printf ("Row %d column %d: ", i+1, j+1);
              scanf  ("%d", &amp;matrix[i][j]);
          }
      }
  }
  
  void print (int *matrix, int row, int column)
  {
      int i;
      int j;
  
      for(i=0; i&lt;row; i++)
      {
          for(j=0; j&lt;column; j++)
          {
              printf("%d ", matrix[i][j]);
          }
          printf("\n");
      }
  }
  </code></pre>