Hello,
I'm storing data in several different binary tree's.
The root node is located in a struct containing general data about the
tree.
struct lnode {
char *fname;
int nentry;
struct tnode *root;
};
struct tnode {
char *data;
int pos;
struct tnode *left, *right;
};
Now, how do I pass the binary tree root to a function since it's
located in another struct ?
For example this doesn't work :(
array[count]->root = tnode_insert(array[count]->root, data);
where array is a dynamic list of ptr's to lnode structs.
Ehmm.. actually I have another question now I am at it..
What's the best to init a struct containing different data-types to
zero ? Is it:
struct lnode *bla = {0};
or
struct lnode *bla = NULL;
Thnkx a lot...!