I can't quite comprehend the sequence when entering while loop.
of curr, int x, and curr->next how are they being compared??Code:struct node{ int data; node *next; } .... node *curr, *prev; while (curr && int x > curr->next){ ... ... }
Thanks
I can't quite comprehend the sequence when entering while loop.
of curr, int x, and curr->next how are they being compared??Code:struct node{ int data; node *next; } .... node *curr, *prev; while (curr && int x > curr->next){ ... ... }
Thanks
hmm..this is a odd.
You're comparing an uninitialised int with an adress..?
basically the statment first checks that curr!=NULL and then it
checks if an unitialized int x is bigger than the adress of the next node. This result would be very unpredictable and I can't see the point of it..what do you want to accomplish ?
/btq
...viewlexx - julie lexx