-
sequence
I can't quite comprehend the sequence when entering while loop.
Code:
struct node{
int data;
node *next;
}
....
node *curr, *prev;
while (curr && int x > curr->next){
...
...
}
of curr, int x, and curr->next how are they being compared??
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 :)