"Hello C world",
I am trying to write a function to return the first element of a link list queue. I am not real sure how to implement this. I have include a copy of the struct for my Node & queue. Thanks in advance for the help.
-DeeMan
Code:
typedef struct event_Node {
void *data;
double arri_time;
double serv_time;
double depart_time;
double start_o_serv;
double wait_time;
bool arri_flag;
bool depart_flag;
bool wait_flag;
bool being_serv_flag;
struct _QueueNode *link;
} event_Node;
typedef struct _Queue {
int size;
QueueNode *head;
QueueNode *tail;
} Queue;
void *queue_front(Queue *q)
{
//return q->size ?
q->head->data : NULL;// this is where I am stuck
}