A utility function to create a new Queuenode
QueueNode * newNode ( char data , unsigned freq ) { QueueNode * temp = new QueueNode [ ( sizeof ( QueueNode ) ) ] ; temp -> left = temp -> right = NULL ; temp -> data = data ; temp -> freq = freq ; return temp ; }