I have made a Bintree, where I sort numbers.
It can fx be phonenumbers.
But how do I delete on in the memorystack,
fx if a numbers is is in the stack and the number is drawn again It has to delete it self, or actually the numbers has to be deleted from the tree.
typedef struct TreeCell *Treeptr;
Treeptr left, right;
// function made.. talloc..!!
return (Treeptr) malloc (sizeof(struct TreeCell));
Treeptr AddCell(Treeptr p, double number)
if(p == NULL)
p = talloc();
p->number = number;
p->right = p->left = NULL;
if(number == p->number)
FUNCTIONCALL (has to delete the number..????)
if(number < p->number)
p->left = AddCell(p->left, number);
p->right = AddCell(p->right, number);
The problem is to delete a number in the stack.
A lot of rearranging has to be done...
Tx hoping to get some help..