A utility function to create a new Queue
Queue * createQueue ( int size ) { Queue * queue = new Queue ( ) ; queue -> front = queue -> rear = -1 ; queue -> size = size ; queue -> array = new node * [ queue -> size * sizeof ( node * ) ] ; int i ; for ( i = 0 ; i < size ; ++ i ) queue -> array [ i ] = NULL ; return queue ; }