if( strcmp(z->Rev->x.y,z->x.y) > 0)

In this statement i want to swap the pNext and pPrev. How will be the assignment look like?

Recommended Answers

Why did you create so many threads for the same problem? It just confuses people. see my answer here: http://www.daniweb.com/software-development/c/threads/419598/linked-list-sorting

Jump to Post

All 2 Replies

C Programming: How to change position of nodes in a link list?
How to change position of nodes in a link list?

if( strcmp(current->Next->a.data,current->a.data) < 0){

I want current->next to be the current and current to be the current -> next?
How to do it?What is the assignment?
How to swap positions or links like this

Not swapped
(C B A )

Swapped

(A B C)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.