title: initializing a matrix, expected expression error in C
body: <p>So I have tried looking up a few things that seemed helpful, but ultimately were not. </p>
  
  <p>I am supposed to initialize a 6x8 matrix as a 2D array in a separate function. I have three files, a main function file, a functions file, and a header file. </p>
  
  <p>Here is relevant code from main </p>
  
  <pre><code>     int plate[MAX_ROWS][MAX_COLS];
  
  double A = 0, B = 0, T1 =0, T2 = 0, C = 0;
  
  printf("\n");
  printf("Welcome to the Heat Plate Simulation\n\n");
  printf("Enter: Heat-A, Heat-B, Plate-1, Plate-2, Stab-Crit\n\n");
  scanf("%lf%lf%lf%lf%lf", &amp;A,&amp;B,&amp;T1,&amp;T2,&amp;C);
  </code></pre>
  
  <p>then I try </p>
  
  <pre><code>    initialize_plate(plate,T1, T2);
  </code></pre>
  
  <p>which goes to </p>
  
  <pre><code>    void initialize_plate(int plate[][MAX_COLS],double T1, double T2)
      {
   plate[MAX_ROWS][MAX_COLS] = {
      { T1, T1, T1, T2, T2, T2},
      { T1, T1, T1, T2, T2, T2},
      { T1, T1, T1, T2, T2, T2},
      { T2, T2, T2, T1, T1, T1},
      { T2, T2, T2, T1, T1, T1},
      { T2, T2, T2, T1, T1, T1} 
      };
  return;
      }
  </code></pre>
  
  <p>The error I receive is 7P_functions.c:14:32: error: expected expression before ‘{’ token
     *plate[MAX_ROWS][MAX_COLS] = {</p>
  
  <p>Given what I have researched with this error my only guess is that it has something to do with the array already being initialized, but I am not sure how to rectify this problem whereas if I initialize the array within the function and not in main doesn't it just become a local variable?</p>
  
  <p>Any help would be much appreciated. </p>