I am building a tree data structure, in which I have an array of pointers in every node (node* children[FIXED_SIZE]), that point to children (size of the array is fixed):
I want to have a child inside the child variable (without freeing memory associated with it) but I also want to delete link between parent and children. Am I doing it correctly?
node* child = NULL;
i=2;
child = parent->children[i];
parent->children[i] = NULL;