Search:

Type: Posts; User: Salem

Search: Search took 0.23 seconds.

  1. Replies
    20
    Views
    2,261

    We did all this 2 weeks ago with insertNode, and...

    We did all this 2 weeks ago with insertNode, and you were either not returning a result, or just ignoring the result.

    Oh well,


    int findNode(NODE *node, int findData)
    {
    if(node == NULL)...
  2. Replies
    20
    Views
    2,261

    Your recursive calls of findnode don't return...

    Your recursive calls of findnode don't return anything.
  3. Replies
    20
    Views
    2,261

    Try this as your main int main(void) { ...

    Try this as your main


    int main(void)
    {
    TREE *tree;
    tree = createTree();
    int i;
    for ( i = 0 ; i < 10 ; i++ ) {
    printf("Root was %p;", (void*)tree->root);
  4. Replies
    20
    Views
    2,261

    Did you try the modification? Did it work? >...

    Did you try the modification?
    Did it work?

    > It would only be applicable for the first node - root, isn't it? Or am I wrong?
    Yes, it only applies to the first assignment.

    But then again, ...
  5. Replies
    20
    Views
    2,261

    So back to line 70, where is THAT result being...

    So back to line 70, where is THAT result being stored?
  6. Replies
    20
    Views
    2,261

    Look at line 40 insertNode(tree->root,...

    Look at line 40
    insertNode(tree->root, newNode, dataIn);

    Look at line 43
    NODE *insertNode(NODE *root, NODE *newNode, int dataIn)

    Now back to line 40
    ...
  7. Replies
    20
    Views
    2,261

    > if(dataInPtr < root->dataPtr) You need to...

    > if(dataInPtr < root->dataPtr)
    You need to store (and compare) values, NOT pointers.
Results 1 to 7 of 7