Thanks a bunch!
Type: Posts; User: GoatMafioso
Thanks a bunch!
I'm not quite sure I understand why you shouldn't be using recursion on this as well as what I -should- be freeing.
As it stands i'm always using the same "Tree" input for testing. I input the...
Hello,
I've posted a few topics on these forums and have received a large amount of help. I'm winding up the program, finally, and I've come to a huge snag. The last function I need to get working...
By correct position I the binary tree needs to be in order. IE: if you were using numbers and 8 was your base/root and you inserted a 4 it would go to the left of the 8 in the tree. Same with...
Ack, i'm sorry. I put the wrong definition. It's supposed to be:
/*
* Creates tree node with the provided info node
* Inserts the tree node into the correct position in the tree
*/
void...
After a little bit more thought it seems that the best way to do this is to create the nodes after checking whether or not the root of the tree is pointing to NULL or not, which deals with the issue...
Hello, i'm working on a project dealing with creating a Binary Tree and I've come to a point where i'm stuck on inserting new nodes into the tree. The following is the definitions for the structs and...
Thanks a bunch, seems to have worked!
ok, so I would just malloc the struct (storing the pointer in a temp variable), using the temp variable to set the passed parameter into the temp->name field than returning temp?
that makes sense. Should I be malloc-ing the entire struct and than creating a pointer that points to it, which I return?
Hello. I'm currently working on a project and I've gone brain dead on some fundamentals and I was hoping someone could maybe point me in the right direction. Here's the basics of one function within...