Rooted Tree (Family tree)
Here is the problem: there are members of a family that should be insert into tree but there are also their spounces that should insert into tree as separated nodes. The only common between original member and their spounces is that spounces must have the same children num, array with children ids, generation, children pointer which is the problem.
If children pointer changes for a member i want to change and for the member's spounce.
typedef struct _Node
struct Node *next_family;
struct Node *parent;
struct Node *spounce;
struct Node *children;
I think the problem located in assignment in the beginning.
Here is where pointers assignment takes place, the rest assignment is ok, here is the problem. temp is the member of tree and newnode his/her spounce.
//If exists and able to accept spounce
//Assign last values
newnode->children=temp->children; // <------Here
Thanks in advance.