Function to reverse the circular doubly linked list.
Why is this function showing an error?
head is a global variable.
void reverse()
{
struct node *z;
struct node *t = head -> forw;
while(t != head)
{
z=t->back;
t->back=t->forw;
t->forw=z;
t = t -> back;
}
z=t->back;
t->back=t->forw;
t->forw=z;
head=t->forw;
}