codice:
#include <iostream>


using namespace std;


// Creo il tipo di dato
typedef struct node {
    node *left;
    node *right;
    int info;
} tree;


// Prototipi delle functions
tree bst_insert(tree *root, int elem);
tree symmetric_order(tree *root);



int main()
{

    tree *root;
    char scelta;
    int elemento;

    root=NULL;

    do {
        cout<<"Inserisci l'elemento da inserire:"<<endl;
        cin>>elemento;
        bst_insert(root, elemento);
        cout<<"Vuoi inserire un altro elemento?";
        cin>>scelta;
    } while (scelta == 's' or scelta == 'S');

    symmetric_order(root);
}


/* symmetric order */
tree symmetric_order(tree *root)
{
    if( root != NULL ){
        symmetric_order(root->left);
        cout<<root->info;
        symmetric_order(root->right);
    }
}


/* Inserimento di un elemento nel bst */
tree bst_insert(tree *root, int elem)
{
    tree *new_node;

      if ( root == NULL ) {

           new_node = new tree;
           new_node->info = elem;
           new_node->left = NULL;
           new_node->right = NULL;
           root = new_node;
      }
      else {
           if ( elem < root->info ) {
                bst_insert(root->left, elem);
           } else if ( elem > root->info ) {
                bst_insert(root->right, elem);
                } else {
                    cout<<"Dato duplicato\n";
           }
      }
      return *root;
}
L'unica modifica l'avevo dimenticata nel main, (root=NULL), oregon, adesso ho provato ad inserire degli elementi nell'albero, dopodichè dopo ho provato a richiamare la function "symmetric_order" per stampare l'albero simmetricamente, ma non stampa nulla. Forse perchè una volta inserito, io restituisco il puntatore all'ultimo elemento inserito?