title: Queue implementation throws incompatible pointer type error
body: <p>I think I'm missing general concepts on structs and pointers. Hence, below code is producing 2 warnings/errors and I don't understand why.</p>
  
  <ol>
  <li><p>Why is "queue->head = temp" producing following warning:
  warning: assignment from incompatible pointer type [enabled by default]</p></li>
  <li><p>Why is "queue->tail->next = temp" producing following error:
  error: dereferencing pointer to incomplete type.</p></li>
  </ol>
  
  <p>Note: The line "Node *temp = newNode(data)" does not throw any error/warnings so it's successful.</p>
  
  <pre><code>typedef struct {
    int data;
    struct Node *next;
  } Node;
  
  typedef struct {
    struct Node *head;
    struct Node *tail;
  } Queue;
  
  void enQueue(Queue *queue, int data) 
  { 
      // Create a new node
      Node *temp = newNode(data); 
  
  
      // If queue is empty, then new node is both head and tail 
      if (queue-&gt;tail == NULL) 
      { 
         queue-&gt;head = temp;
         queue-&gt;tail = temp; 
         return; 
      } 
  
      // Add the new node at the end of queue and change tail 
      queue-&gt;tail-&gt;next = temp; 
      queue-&gt;tail = temp;
  }
  </code></pre>