You could create a struct like this:
typedef struct{
void *mydata;
int numchildren;
void **children;
}mytree;
Where
mydata
is a pointer to the data you wish to associate with each tree item,
numchildren
the number of a children a tree item has, and
children
a pointer to an array of
mytree
structs for each child.