hi again guys.half of the code is working now,but still struggling with pointers.my next problem now is passing the *front and *rear
second time in a function.
i want to use the enqueue function in a other function (for example,showqueue, a function that dequeues-prints-enqueues).
Any ideas?should i give up with all this?totally wrong?Code:
void showqueue(int qsiz,struct node **fro,struct node **rea)
{
int q,va;
struct node *tmpee;
for (q=0;q<qsiz;q++)
{
dequeue(&va,&fro,&rea,&qsiz);
if (q==0)
printf("[%d]<--front\n",va);
else if (q==qsiz)
printf("[%d]<--rear",va);
else
printf("[%d]\n",va);
tmpee=newnode(va);
enqueue(&fro,&rea,tmpee,&qsiz);
}
}