A new child is added to the parent node, and a pointer to the new child is returned in newNodePtr. The type of newNodePtr is checked and the new child is of the appropriate type.
The following code creates a new tree and adds an erp child below the top level node.
eventNode *ev; erpNode *erpPtr; F_createTree(ev); F_addChild(ev,erpPtr);