tree è un puntatore a struttura, non la struttura in se
codice:
tree inserisci_elemento(tree T, int val)//qui vengono inseriti gli elementi voluti dall'utente
{
    if(T==NULL)
        {    
/*         T=(tree)malloc(sizeof(tree)); */
         T=(tree)malloc(sizeof(struct node));
         T->value = val;
         T->sx = NULL;
         T->dx = NULL;
        }    
... etc