Thread: xor linked list

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    21

    xor linked list

    i have a delema with my xor linked list program....now i keep getting the bottom error i will also get segmentation errors throughout the insert function!!!


    i have the list commented out at all times....the only thing it will do right now is input numbers!!

    and will output the number being passed in...and then what the head is afterwards...
    this is the source code revised again:
    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include "rndm.h"
    
    #define MAX_NUMBERS 100
    
    typedef struct _node{
            int data;
            unsigned long link;
    } node;//end node
    
    node *tmp, *head, *tail, *next, *prv, *cur;
    
    void  insert(insertNum){
            printf("This is the random number passed in %d\n", insertNum);
            node *nekw = (node *)malloc(sizeof(node));
            nekw->data = insertNum;
            printf("this is the number inputed %d\n", nekw->data );
            cur = head;
            prv = NULL;
            while(cur != NULL && cur->data < insertNum){
                    next = (node *)(cur->link ^ (unsigned long)prv);
                    prv = cur;
                    cur = next;
            }//end while loop
            if(prv == NULL){
                    head = nekw;
            }//end if statement.
            else{
                    nekw->link ^= (unsigned long) prv ^(unsigned long) cur;
                    prv->link ^= (unsigned long) cur ^ (unsigned long) nekw;
                    cur->link ^= (unsigned long) prv ^ (unsigned long) nekw;
            }//end else statement.
    }//end insert.
    
    void delete(int deleteNum){
            printf("I am in the delete function!\n");
            cur = head;
            printf("This is in cur before i start %2.1d\n", cur->data);
            prv = NULL;
            while(cur != NULL && (cur->data != deleteNum)){
                    prv =(node *)(cur->link ^ (unsigned long)next);
                    prv = cur;
                    cur = next;
            }//end while loop
            if(cur != NULL && (cur->data == deleteNum)){
                    printf("this is what was found %2.1d\n", cur->data);
                    prv->link ^= (unsigned long) prv ^ (unsigned long) cur;
                    next->link ^= (unsigned long) cur^ (unsigned long) next;
                    free(cur);
            }//end if statement.
    }//end delete.
    
     void list(int option){
            int cnt = 1;
            if(option == 1){
                    cur = head;
                    prv = NULL;
                    printf("This is the list in acending order: \n");
                    while(cnt <= MAX_NUMBERS){
                            printf("%3.1d", cur->data);
                            cnt++;
                            if(cnt % 10 == 0){
                                    printf("\n");
                            }//end if statement
                            prv =(node *)(cur->link^(unsigned long)next);
                            prv = cur;
                            cur = next;
                    }//end while loop
            }//end if
            else if(option == 2){
                    cur = tail;
                    next = NULL;
                    printf("This is the list in decending order: \n");
                    if(cnt % 10 == 0){
                            printf("\n");
                    }//end if statement.
                    while (cnt <= MAX_NUMBERS){
                            printf("%3.1d", prv->data);
                            cnt++;
                            if(cnt % 10 == 0){
                                    printf("\n");
                            }//end if statement.
                            prv = (node *)(cur->link^(unsigned long) prv);
                            next = cur;
                            cur = prv;
                    }//end while loop.
            }//end else if
    }//end list.
    
    int main(){
            head = NULL;
            tail = head;
            long inputZ;
            int num, option,cnt, beginning, end;
            int numDelete;
            printf("Please enter the seed: ");
            scanf("%l\n", &inputZ);
            init_seed(inputZ);
    
            printf("Please enter the range: ");
            scanf("%d%d\n", &beginning, &end);
            set_range(beginning, end);
    
            for(cnt=0; cnt <= MAX_NUMBERS; cnt++){
                    insert(rndm());
            }//end for loop.
    #if 0
            printf("For ascending press 1, or 2 for decending: ");
            scanf("%d\n", &num);
            list(num);
    
            numDelete = 7004;
            delete(numDelete);
    
            printf("For ascending press 1, or 2 for decending: ");
            scanf("%d\n", &num);
            list(num);
    #endif
            return 0;
    }//end main.
    here is my output:
    Code:
    > gcc linkList.c rndm.o
    >ls
    a.out*  lab1/  lab2/  linkList.c  rndm.h  rndm.o
    > a.out
    Please enter the seed: 12345
    Please enter the range: 1 9999
    This is the random number passed in 3995
    this is the number inputed 3995
    This is the random number passed in 10463
    this is the number inputed 10463
    Segmentation fault
    >
    i don't understand what is going wrong....the only time the input should really brake down is the first one inserted and if a number inputed into a list of nodes is less than the first node then i have a problem....otherwise i should just be inserting nodes that have different numbers that are less than the next one!! but it seems to break down before i even insert a number!!!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,677
    > node *tmp, *head, *tail, *next, *prv, *cur;
    Ewww, so many global variables with poor names

    > printf("This is the random number passed in &#37;d\n", insertNum);
    > node *nekw = (node *)malloc(sizeof(node));
    Are you really using a C compiler?
    Because
    a) mixed declarations and statements (the printf before the node)
    b) casting the result of malloc unnecessarily (see the FAQ)
    Try
    gcc -W -Wall -ansi -pedantic -O2 prog.c
    That'll show some interesting stuff.

    Oh, and you DON'T assign -> link when you add the first node.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    And whilst it may seem clever to use XOR to implement a swap, it is not a good plan really - it is almost certainly slower than a temporary variable on a modern compiler, and with a swap macro, you could do the swap itself without a cast.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    21
    well i was thinking because i am using dynamic variables that would be wanting to use malloc??

    using the stdio.lib size of function...ohh and this is a homework assignment so i don't have much say in the matter of just not doing a xor linked list!!

    i ran this gcc -W -Wall -ansi -pedantic -O2 linkList.c

    what does it do it gave me hella errors!

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by adramalech View Post
    well i was thinking because i am using dynamic variables that would be wanting to use malloc??

    using the stdio.lib size of function...ohh and this is a homework assignment so i don't have much say in the matter of just not doing a xor linked list!!

    i ran this gcc -W -Wall -ansi -pedantic -O2 linkList.c

    what does it do it gave me hella errors!
    So fix those (and ask here if you don't understand what it means).

    As to "you don't have a choice", Ok, fine - I just wanted to tell you that the "clever" trick is now so clever that the compiler/processor is getting confused and thus the code is actually worse than a straight/simple swap operation - it is not a good idea to use this in REAL CODE - and thus I doubt that it's a good idea for your teacher to teach you that sort of thing. You may get the impression that it's a good idea to do things this way.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Quote Originally Posted by adramalech View Post
    using the stdio.lib size of function
    sizeof is not in stdlib.h. It's a compile-time operator.

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,677
    > i ran this gcc -W -Wall -ansi -pedantic -O2 linkList.c
    > what does it do it gave me hella errors!
    And aren't you glad you found them now.
    And not several years later when you has a hell of a lot more code, and a new compiler even fussier than the one you have.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Quote Originally Posted by matsp View Post
    So fix those (and ask here if you don't understand what it means).

    As to "you don't have a choice", Ok, fine - I just wanted to tell you that the "clever" trick is now so clever that the compiler/processor is getting confused and thus the code is actually worse than a straight/simple swap operation - it is not a good idea to use this in REAL CODE - and thus I doubt that it's a good idea for your teacher to teach you that sort of thing. You may get the impression that it's a good idea to do things this way.

    --
    Mats
    Matsp made a similar comment that I copied and pasted off another website (I think it was a strrev() function or something). Even though the code wasn't mine and I wasn't disputing the merits of his claims, he did go through the trouble of proving that the xor technique does suffer a performance ding.

  9. #9
    Registered User
    Join Date
    Oct 2008
    Posts
    21
    okay so i think i got the insert function down....but it is inserting memory allocations!!! because those numbers aren't even close to being in the 1 to 9999 range!

    i think i might be passing by memory location??? i thought C passes by value!!!

    furthermore, it seems from the output that it is only inserting from the first case and not the other cases!!!

    here is my ouput:

    Code:
    > cd CSC60
    > gcc linkList.c rndm.o
    > a.out
    Please enter the seed: 123456
    Please enter the range: 1 9999
    this is the number inserted 39931
    this is the data of head 39931
    this is the number inserted 104625
    this is the data of head 104625
    this is the number inserted 36233
    this is the data of head 36233
    this is the number inserted 44149
    this is the data of head 44149
    this is the number inserted 7891
    this is the data of head 7891
    this is the number inserted 122210
    this is the data of head 122210
    this is the number inserted 35377
    this is the data of head 35377
    this is the number inserted 101254
    this is the data of head 101254
    this is the number inserted 38017
    this is the data of head 38017
    this is the number inserted 29102
    this is the data of head 29102
    this is the number inserted 77217
    this is the data of head 77217
    this is the number inserted 114125
    this is the data of head 114125
    this is the number inserted 78533
    this is the data of head 78533
    this is the number inserted 7201
    this is the data of head 7201
    this is the number inserted 118236
    this is the data of head 118236
    this is the number inserted 31285
    this is the data of head 31285
    this is the number inserted 98209
    this is the data of head 98209
    this is the number inserted 102561
    this is the data of head 102561
    this is the number inserted 27972
    this is the data of head 27972
    this is the number inserted 94344
    this is the data of head 94344
    this is the number inserted 85547
    this is the data of head 85547
    this is the number inserted 116748
    this is the data of head 116748
    this is the number inserted 88288
    this is the data of head 88288
    this is the number inserted 20224
    this is the data of head 20224
    this is the number inserted 116579
    this is the data of head 116579
    this is the number inserted 79398
    this is the data of head 79398
    this is the number inserted 107279
    this is the data of head 107279
    this is the number inserted 67179
    this is the data of head 67179
    this is the number inserted 48472
    this is the data of head 48472
    this is the number inserted 71278
    this is the data of head 71278
    this is the number inserted 45211
    this is the data of head 45211
    this is the number inserted 76139
    this is the data of head 76139
    this is the number inserted 31341
    this is the data of head 31341
    this is the number inserted 53153
    this is the data of head 53153
    this is the number inserted 112910
    this is the data of head 112910
    this is the number inserted 32772
    this is the data of head 32772
    this is the number inserted 34117
    this is the data of head 34117
    this is the number inserted 45641
    this is the data of head 45641
    this is the number inserted 29232
    this is the data of head 29232
    this is the number inserted 28596
    this is the data of head 28596
    this is the number inserted 83326
    this is the data of head 83326
    this is the number inserted 72950
    this is the data of head 72950
    this is the number inserted 12574
    this is the data of head 12574
    this is the number inserted 58169
    this is the data of head 58169
    this is the number inserted 91872
    this is the data of head 91872
    this is the number inserted 15916
    this is the data of head 15916
    this is the number inserted 62159
    this is the data of head 62159
    this is the number inserted 3045
    this is the data of head 3045
    this is the number inserted 28327
    this is the data of head 28327
    this is the number inserted 6043
    this is the data of head 6043
    this is the number inserted 51752
    this is the data of head 51752
    this is the number inserted 25053
    this is the data of head 25053
    this is the number inserted 50715
    this is the data of head 50715
    this is the number inserted 119898
    this is the data of head 119898
    this is the number inserted 67846
    this is the data of head 67846
    this is the number inserted 20697
    this is the data of head 20697
    this is the number inserted 42638
    this is the data of head 42638
    this is the number inserted 39936
    this is the data of head 39936
    this is the number inserted 66748
    this is the data of head 66748
    this is the number inserted 89742
    this is the data of head 89742
    this is the number inserted 9457
    this is the data of head 9457
    this is the number inserted 20340
    this is the data of head 20340
    this is the number inserted 88505
    this is the data of head 88505
    this is the number inserted 88967
    this is the data of head 88967
    this is the number inserted 75168
    this is the data of head 75168
    this is the number inserted 4294
    this is the data of head 4294
    this is the number inserted 24406
    this is the data of head 24406
    this is the number inserted 38265
    this is the data of head 38265
    this is the number inserted 10733
    this is the data of head 10733
    this is the number inserted 106617
    this is the data of head 106617
    this is the number inserted 60492
    this is the data of head 60492
    this is the number inserted 5448
    this is the data of head 5448
    this is the number inserted 49862
    this is the data of head 49862
    this is the number inserted 107570
    this is the data of head 107570
    this is the number inserted 25043
    this is the data of head 25043
    this is the number inserted 7732
    this is the data of head 7732
    this is the number inserted 33556
    this is the data of head 33556
    this is the number inserted 120585
    this is the data of head 120585
    this is the number inserted 11842
    this is the data of head 11842
    this is the number inserted 106301
    this is the data of head 106301
    this is the number inserted 51116
    this is the data of head 51116
    this is the number inserted 78403
    this is the data of head 78403
    this is the number inserted 60591
    this is the data of head 60591
    this is the number inserted 58978
    this is the data of head 58978
    this is the number inserted 119318
    this is the data of head 119318
    this is the number inserted 80126
    this is the data of head 80126
    this is the number inserted 6962
    this is the data of head 6962
    this is the number inserted 63993
    this is the data of head 63993
    this is the number inserted 79383
    this is the data of head 79383
    this is the number inserted 110669
    this is the data of head 110669
    this is the number inserted 19092
    this is the data of head 19092
    this is the number inserted 110373
    this is the data of head 110373
    this is the number inserted 95561
    this is the data of head 95561
    this is the number inserted 38271
    this is the data of head 38271
    this is the number inserted 98800
    this is the data of head 98800
    this is the number inserted 33324
    this is the data of head 33324
    this is the number inserted 49864
    this is the data of head 49864
    this is the number inserted 10661
    this is the data of head 10661
    this is the number inserted 8895
    this is the data of head 8895
    this is the number inserted 69536
    this is the data of head 69536
    this is the number inserted 27843
    this is the data of head 27843
    >
    here is my source code... i think i only changed up some of the insert method!!

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include "rndm.h"
    
    #define MAX_NUMBERS 100
    
    typedef struct _node{
            int data;
            unsigned long link;
    } node;//end node
    
    node *tmp, *head, *tail, *next, *prv, *cur;
    
    void  insert(int insertNum){
            printf("this is the number inserted &#37;d\n", insertNum);
            node *nekw = (node *)malloc(sizeof(node));
            nekw->data = insertNum;
            cur = head;
            prv = NULL;
            if(cur == NULL){
                    cur = nekw;
                    next = tail;
                    printf("this is the data of head %d\n", cur->data);
            }//end if statement.
    
            else if((cur->data > nekw->data)&& (cur !=NULL)){
                    tmp = cur;
                    nekw->link = tmp->link;
                    cur = nekw;
                    tmp->link = cur->link ^ next->link;
                    prv->link ^= (unsigned long) prv ^ (unsigned long) tmp;
                    cur->link ^= (unsigned long) prv ^ (unsigned long) next;
                    tmp = NULL;
                    printf("this is the data of cur %d\n", &cur->data);
            }//end else if statement
            else{
                    while(cur != NULL && (cur->data < insertNum)){
                            next = (node *)(cur->link ^ (unsigned long)prv);
                            prv = cur;
                            cur = next;
                    }//end while loop
    
                    nekw->link ^= (unsigned long) prv ^(unsigned long) cur;
                    prv->link ^= (unsigned long) cur ^ (unsigned long) nekw;
                    cur->link ^= (unsigned long) prv ^ (unsigned long) nekw;
            }//end else statement
    }//end insert.
    
    void delete(int deleteNum){
            cur = head;
            prv = NULL;
            while(cur != NULL && (cur->data != deleteNum)){
                    prv =(node *)(cur->link ^ (unsigned long)next);
                    prv = cur;
                    cur = next;
            }//end while loop
            if(cur != NULL && (cur->data == deleteNum)){
                    prv->link ^= (unsigned long) prv ^ (unsigned long) cur;
                    next->link ^= (unsigned long) cur^ (unsigned long) next;
                    free(cur);
            }//end if statement.
    }//end delete.
    
     void list(int option){
            int cnt = 1;
            if(option == 1){
                    cur = head;
                    prv = NULL;
                    printf("This is the list in acending order: \n");
                    while(cnt <= MAX_NUMBERS){
                            printf("%3.1d", cur->data);
                            cnt++;
                            if(cnt % 10 == 0){
                                    printf("\n");
                            }//end if statement
                            prv =(node *)(cur->link^(unsigned long)next);
                            prv = cur;
                            cur = next;
                    }//end while loop
            }//end if
            else if(option == 2){
                    cur = tail;
                    next = NULL;
                    printf("This is the list in decending order: \n");
                    if(cnt % 10 == 0){
                            printf("\n");
                    }//end if statement.
                    while (cnt <= MAX_NUMBERS){
                            printf("%3.1d", prv->data);
                            cnt++;
                            if(cnt % 10 == 0){
                                    printf("\n");
                            }//end if statement.
                            prv = (node *)(cur->link^(unsigned long) prv);
                            next = cur;
                            cur = prv;
                    }//end while loop.
            }//end else if
    }//end list.
    
    int main(){
            head = NULL;
            tail = head;
            long inputZ;
            int cnt, beginning, end, num, numDelete;
    
            printf("Please enter the seed: ");
            scanf("%l\n", &inputZ);
            init_seed(inputZ);
    
            printf("Please enter the range: ");
            scanf("%d%d\n", &beginning, &end);
            set_range(beginning, end);
    
            for(cnt=0; cnt <= MAX_NUMBERS; cnt++){
                    insert(rndm());
            }//end for loop.
    #if 0
            printf("For ascending press 1, or 2 for decending: ");
            scanf("%d\n", &num);
            list(num);
    
            numDelete = 7004;
            delete(numDelete);
    
            printf("For ascending press 1, or 2 for decending: ");
            scanf("%d\n", &num);
            list(num);
    #endif
            return 0;
    }//end main.
    Last edited by adramalech; 10-07-2008 at 10:09 PM.

  10. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,334
    I don't see you changing head anywhere. So that would appear to always and forever be NULL. (You set cur to nekw, but who cares?)

  11. #11
    Registered User
    Join Date
    Oct 2008
    Posts
    21
    thanks...that was an eye opener it took me some time but i figured out that i forgot to set head and some of the others to what was made!!!

  12. #12
    Registered User
    Join Date
    Oct 2008
    Posts
    21
    okay i got the insert function working, i got the delete function working correctly, but i am having problems with the list function...here is what my program looks like with just dumby variables as the data and not rndm()!!

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    #define MAX_NUMBERS 100
    
    typedef struct _node{
            int data;
            unsigned long link;
    } node;//end node
    
    node *head, *tail;
    
    void  insert(int insertNum){
    
            node *nekw, *tmp, *next, *prv, *cur;
            nekw = malloc(sizeof(node));
            cur = head;
            prv = NULL;
            nekw->data = insertNum;
    
            if(cur == NULL){
                    head = nekw;
                    cur = head;
                    next = tail;
            }//end if statement.
    
            else if(cur->data > nekw->data){
                    tmp = cur;
                    cur = nekw;
                    cur->link = tmp->link;
                    next = (node*)(cur->link ^ (unsigned long)prv);
                    if(next == NULL){
                            next = tmp;
                            tail = next;
                    }//end if statement
                    else{
                            tmp->link = (unsigned long)cur ^ (unsigned long)next;
                            cur->link = (unsigned long)prv ^ (unsigned long)tmp;
                            nekw = (node *)(next->link ^ (unsigned long) cur);
                            next->link = (unsigned long)nekw ^ (unsigned long)tmp;
                            cur = tmp;
                    }//end else statement
            }//end else if statement
            else{
                    while((cur != NULL) && (cur->data < nekw->data)){
                            next = (node *)(cur->link ^ (unsigned long)prv);
                            prv = cur;
                            cur = next;
                    }//end while loop
                    if(next == NULL){
                            cur = nekw;
                            tail = cur;
                    }//end if statement
                    else{
                            nekw->link = (unsigned long) cur ^(unsigned long) next;
                            cur->link = (unsigned long) nekw ^ (unsigned long) prv;
                            tmp = (node *)(next->link ^ (unsigned long)cur);
                            next->link = (unsigned long) nekw ^ (unsigned long) tmp;
                            cur = nekw;
                    }//end else
            }//end else statement
    }//end insert.
    
    void delete(int deleteNum){
            node *cur, *prv, *next;
            cur = head;
            prv = NULL;
            while(cur != NULL && (cur->data != deleteNum)){
                    prv =(node *)(cur->link ^ (unsigned long)next);
                    prv = cur;
                    cur = next;
            }//end while loop
            if(cur != NULL && (cur->data == deleteNum)){
                    prv->link = (unsigned long) prv ^ (unsigned long) cur;
                    next->link = (unsigned long) cur^ (unsigned long) next;
                    free(cur);
            }//end if statement.
    }//end delete.
    
     void list(){ //int option
            int cnt;
            node *cur, *prv, *next, *tmp;
            tmp = malloc(sizeof(node));
            cur = head; //here is where i have a breakpoint for gdb!!!
            prv = NULL;
            printf("This is the list in acending order: \n");
            while(cnt < MAX_NUMBERS){
                       printf("&#37;d", cur->data);
                       cnt++;
                       next = (node *)(cur->link ^ (unsigned long)prv);
                       prv = cur;
                       cur = next;
                       printf("  %d", cur->data);//this is where it will error because cur = NULL
                       if(cnt % 10 == 0){
                                 printf("\n");
                       }//end if statement.
            }//end while loop
    
    }//end list.
    
    int main(){
            head = NULL;
            tail = head;
            static int cnt, numDelete;
    
            for(cnt=1; cnt < MAX_NUMBERS; cnt++){
                    insert(cnt);
            }//end for loop.
    
            list();
    
            numDelete = 99;
            delete(numDelete);
    
            list();
    
            return 0;
    }//end main.
    Last edited by adramalech; 10-08-2008 at 09:34 PM.

  13. #13
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,334
    Why does your walk the list code look different in insert and print? Insert has
    Code:
    next = (node *)(cur->link ^ (unsigned long)prv);
    prv = cur;
    cur = next;
    shouldn't that be where your trouble section is?

  14. #14
    Registered User
    Join Date
    Oct 2008
    Posts
    21
    well see i am incrementing a pointer to next so i can traverse the list....those three lines are how i would traverse the list and i then output what is in cur->data until i get to the end...

    it is very simple but it seems i am screwing something small up!!!

  15. #15
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,334
    Quote Originally Posted by adramalech View Post
    well see i am incrementing a pointer to next so i can traverse the list....those three lines are how i would traverse the list and i then output what is in cur->data until i get to the end...
    Exactly: those three lines are how you traverse the list. Since that's not what you have in your "traverse the list' section where the error is, why do you not fix it?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 06:55 PM
  2. instantiated from here: errors...
    By advocation in forum C++ Programming
    Replies: 5
    Last Post: 03-27-2005, 09:01 AM
  3. How can I traverse a huffman tree
    By carrja99 in forum C++ Programming
    Replies: 3
    Last Post: 04-28-2003, 05:46 PM
  4. List class
    By SilasP in forum C++ Programming
    Replies: 0
    Last Post: 02-10-2002, 05:20 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM