Swap pointers in list
Hello,
I have a problem. I have list and I would like swap pointers. How to do? The A pointer is head.
1 2 3 4 5 6 7 8 9 10 11 12 13
|
if (A != head)
{
prevA->next = B;
prevB->next = A;
temp = B->next;
B->next = A->next;
A->next = temp;
}
else if (A == head)
{
//??????????????
}
|
Last edited on
Topic archived. No new replies allowed.