Thread: sequence

  1. #1
    Registered User
    Join Date
    Aug 2002


    I can't quite comprehend the sequence when entering while loop.

    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??

  2. #2
    julie lexx... btq's Avatar
    Join Date
    Jun 2002
    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 ?

    ...viewlexx - julie lexx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. reading a sequence
    By drag0n69 in forum C Programming
    Replies: 4
    Last Post: 03-17-2008, 04:40 PM
  2. Immediate programming help! Please!
    By xMEGANx in forum C++ Programming
    Replies: 6
    Last Post: 02-20-2008, 11:52 AM
  3. sequence
    By braddy in forum C Programming
    Replies: 2
    Last Post: 03-30-2006, 01:15 PM
  4. wsprintf and format specifiers
    By incognito in forum Windows Programming
    Replies: 2
    Last Post: 01-03-2004, 09:00 PM
  5. How do I restart a random number sequence.
    By jeffski in forum C Programming
    Replies: 6
    Last Post: 05-29-2003, 02:40 PM
Website Security Test