I am trying to write a funtion to print the contents of a queue using ADT funtions. I composed the following code. It gives me a error of invalid type argument. Need help.
int print_queue(QUEUE *queue)
{
int tempCount;
int inputVal;
while ((queue_count(queue)) != 0)
{
tempCount = queue_count(queue);
queue_front(queue, (void*)&inputVal);
printf("%d\n", *inputVal);
dequeue(queue, (void*)&inputVal);
enqueue(queue, *inputVal);
tempCount --;
}
}