title: 'struct <anonymous>' has no member named
body: <p>Looking for the way to reference the node and set it to null for the creation function. Any suggestions from that given output to put the front and back nodes in the queue to NULL?</p>
  
  <pre><code>gcc -std=c99 -ggdb -Wall -Wextra  -c queueADT.c
  queueADT.c:13:1: warning: useless storage class specifier in empty declaration [enabled by default]
   };
   ^
  queueADT.c: In function 'que_create':
  queueADT.c:36:6: error: 'struct &lt;anonymous&gt;' has no member named 'front'
     new-&gt;front = NULL;
        ^
  queueADT.c:37:6: error: 'struct &lt;anonymous&gt;' has no member named 'rear'
     new-&gt;rear = NULL;
        ^
  queueADT.c:38:8: error: expected identifier before '*' token
     new-&gt;*cmprFunc = NULL;
  </code></pre>
  
  <p>Here is the main part of the code which caused the errors. (2 structs )</p>
  
  <pre><code>typedef struct node {
      void* data;
      //size_t num;
      struct node *next;
  };
  
  
  struct QueueADT {
      struct node front;                     /* pointer to front of queue */
      struct node rear;                      /* pointer to rear of queue  */
      int *contents[ QUEUE_SIZE ];      /* number of items in queue  */
      int *cmprFunc;                    /* The compare function used for insert */
  };
  
  
  #include "queueADT.h"
  
  
  /// create a queue that is either sorted by cmp or FIFO
  //function with two void
  QueueADT que_create( int (*cmp)(const void*a,const void*b) ) {
  
      QueueADT new;
      new = (QueueADT)malloc(sizeof(struct QueueADT));
  
      if (cmp == NULL) {
          //do I create a new pointer to the cmp_int64?
          new-&gt;front = NULL;
          new-&gt;rear = NULL;
          new-&gt;*cmprFunc = NULL;
  
      } else {
          new-&gt;*cmprFunc = &amp;cmp;
          new-&gt;front = NULL;
          new-&gt;rear = NULL;
      }
  
      return ( new );
  }
  </code></pre>