// Abstract Data Type Queue demo
// Marc Chee, April 2019

// This file describes the interface to a queue of ints
// It must be included in other code files to be of use

// ======================================================
// The type "queue" refers to a queue_internals pointer.
// In other files, programs can use queue, but they will
// not get direct access to the queue's internal workings
// nor will they know exactly what they are
typedef struct queueInternals *queue;

// ======================================================
// These functions are the only way external code can
// manipulate a queue.

// functions to create and destroy queues
queue queueCreate();
void queueFree(queue q);

// Add and remove items from queues
// Removing the item returns the item for use
void queueAdd(queue q, int item);
int queueRemove(queue q);

// Check on the size of the queue
int queueSize(queue q);

Resource created Tuesday 23 April 2019, 01:57:55 AM, last modified Tuesday 23 April 2019, 01:59:14 AM.

file: queue.h


Back to top

COMP1511 19T1 (Programming Fundamentals) is powered by WebCMS3
CRICOS Provider No. 00098G