Contents
Description
The function adds an element to the queue. The element you add must be added to the queue in a type of char *.
Function signature
int enqueue(Queue *queue, char *element);
Params
-
queue - pointer to the queue
-
element - pointer to the element to be added to the queue. The element you add must be added to the queue in a type of char *.
Return value
The function returns 0 if the element was added to the queue successfully. Otherwise, the function returns -1.