The prototype is as follows:
void Tree_setrootvalue(struct Tree *pTree, int value);
|
It should first check if the tree pointed to by pTree is empty. If so, a new node should be created for the tree. If the tree is not empty, there is no need to create a new node.
Next, the value of the node should be updated to value.