title: invalid type argument of -> have struct room
body: <p>Alright Here is my situation. I need to use pointers for my room struct but for some reason its saying -> is a invalid type. When i was the dot, it works. The thing is AllRooms is a pointer so shouldn't it be -> to modify the elements in the struct. What do i need to change so i can use the -> instead of the dot. Or with my situation its better to use the dot?</p>
  
  <pre><code>struct room
  {
     int roomNum;
     int creaturesTotal;
     int roomStatus;
     int roomTotal;
     int north;
     int south;
     int east;
     int west;
  };
  
  
  
  int main
  {
  
      int numberofrooms = 0;
  
      *ask user for rooms and creatures*/
      printf("How many rooms? Max 100 rooms: ");
      scanf("%d",&amp;numberofrooms);
  
      /*make sure its under 10 rooms*/
      while(numberofrooms &gt; 100)
      {
         printf("\nToo many rooms!\n");
         printf("How many rooms? Max 100 rooms: ");
         scanf("%d",&amp;numberofrooms);
      }
  
    struct Creatures* AllCreatures = malloc(numberofcreatures * sizeof(numberofcreatures));
  
    createRooms(numberofrooms, AllRooms);
  
  }
  
  
  
  void createRooms(int numberofrooms,struct room* AllRooms)
  {
  int counter = 0;
  int status;
  int north;
  int south;
  int east;
  int west;
  
  //ask the user for the cords
  for(int i =0; i &lt; numberofrooms;i++)
  {
      printf("Room Number %d state north south east west: ",counter);
      scanf("%d%d%d%d%d",&amp;status,&amp;north,&amp;south,&amp;east,&amp;west);
      AllRooms[i]-&gt;roomStatus = status;
      AllRooms[i]-&gt;north = north;
      AllRooms[i]-&gt;south = south;
      AllRooms[i]-&gt;east = east;
      AllRooms[i]-&gt;west = west;
      AllRooms[i]-&gt;roomNum = counter;
      AllRooms[i]-&gt;roomTotal = 0;
      counter++;
  }
  
  //print out the cords
  for(int i =0; i &lt; numberofrooms;i++)
  {
      printf("\n%d,%d,%d,%d,%d\n",AllRooms[i].roomStatus,AllRooms[i].north,AllRooms[i].south,AllRooms[i].east,AllRooms[i].west);
  }
  }
  </code></pre>