- I don't understand the question.
- The expression (&T) returns a value of type nodeptr**, when T is of type nodeptr*, but insert expects an argument of type nodeptr*.
- Case 10 doesn't change the value of T, so the nodeptr T still points at the same place in memory as it pointed before. Technically, that memory is freed, and it could be overwritten when another block of memory is allocated and written over. However, until that happens, the values in memory are still there. Perhaps you should make cleartree a function with the declaration void cleartree(nodeptr* T), so that it can set *T = NULL;
Reputation Points: 1135
Solved Threads: 171
Super Senior Demiposter
Offline 2,478 posts
since Jun 2005