
vittoriaaa!!!!!!!!!!!!!!
Ci sono riuscito finalmente. Praticamente la funzione ReadTree andava scritta così:
Codice:
TREE ReadTree() {
TREE t = (TREE)malloc(sizeof(NODE));
int fHasLeft, fHasRight;
int nData;
scanf("%d %d %d", &fHasLeft, &fHasRight, &nData);
t->nData = nData;
t->pLeft = NULL; /* Mancavano queste due
t->pRight= NULL; righe */
if (fHasLeft) {
t->pLeft = ReadTree();
}
if (fHasRight) {
t->pRight = ReadTree();
}
return t;
}
Grazie cmq per l'interessamento