#include #include #include #ifndef NULL #define NULL (void *)0 #endif #include "dll.h" #include "queue.h" Queue* makeQueue() { Queue *rtn = malloc(1 * sizeof(Queue)); rtn->internal = makeDLL(); return rtn; } void freeQueue(Queue* q) { freeDLL(q->internal); free(q); } void add2Queue(Queue* q, char* item) { addDLLHead(q->internal, item); } char* pullFromQueue(Queue* q) { return removeTail(q->internal); } int main(int argc, char const *argv[]) { Queue *q = makeQueue(); add2Queue(q, "Mary"); add2Queue(q, "Jane"); add2Queue(q, "Greta"); char *nn = pullFromQueue(q); printf("%s\n", nn); return 0; }