title: error: invalid type argument of '->' (have 'struct node')
body: <p>Why cant i access the pointer "Cells" like an array ? i have allocated the appropriate memory why wont it act like an array here? it works like an array for a pointer of basic data types.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include&lt;ctype.h&gt;
  #define MAX 10
  struct node
  {
      int e;
      struct node *next;
  };  
  
  typedef struct node *List;
  typedef struct node *Position;
  
  struct Hashtable
  {
      int Tablesize;
      List Cells;
  };
  
  typedef struct Hashtable *HashT;
  
  HashT Initialize(int SIZE,HashT H)
  {   
      int i;
      H=(HashT)malloc(sizeof(struct Hashtable));
      if(H!=NULL)
      {
          H-&gt;Tablesize=SIZE;
          printf("\n\t%d",H-&gt;Tablesize);
          H-&gt;Cells=(List)malloc(sizeof(struct node)* H-&gt;Tablesize);
  </code></pre>
  
  <p>should it not act like an array from here on?</p>
  
  <pre><code>        if(H-&gt;Cells!=NULL)
          {
              for(i=0;i&lt;H-&gt;Tablesize;i++)
  </code></pre>
  
  <p>the following lines are the ones that throw the error</p>
  
  <pre><code>            { H-&gt;Cells[i]-&gt;next=NULL;
                H-&gt;Cells[i]-&gt;e=i;
                  printf("\n %d",H-&gt;Cells[i]-&gt;e);
              }
           }
       }
       else printf("\nError!Out of Space");
  }
  
  int main()
  {  
      HashT H;
      H=Initialize(10,H);
      return 0;
  }
  </code></pre>
  
  <p>The error I get is as in the title-error: <code>invalid type argument of '-&gt;' (have 'struct node').</code></p>