title: Incompatible Type Error While Implementing a Struct Array
body: <p>I am trying to create a struct array named Record. For this, I used the code below:</p>
  
  <pre><code>typedef struct{
    int studentID;
    char studentName[20];
  }STUDENT;
  
  typedef struct{
     STUDENT item;
     struct RECORD *link;
  }RECORD;
  
  void initializeTable(RECORD *, int);
  
  int main(){
    int i;
    int m;
    RECORD *hashTable;
  
    printf("Table Size: "); scanf("%d", &amp;m);
    initializeTable(hashTable, m);
  }
  
  void initializeTable(RECORD *hashTable, int m){
    int i;
    hashTable = (RECORD *)malloc(m * sizeof(RECORD));
    for(i=0; i&lt;m; i++){
      hashTable[i] = NULL;
    }
  }
  </code></pre>
  
  <p>I got this error:  </p>
  
  <pre><code>incompatible types when assigning to type ‘RECORD {aka struct &lt;anonymous&gt;}’ from type ‘void *’
   hashTable[i] = NULL;
  </code></pre>
  
  <p>Where am I doing wrong?</p>