create a syntax tree
int main ( ) { node * root = new node ( " + " ) ; root -> left = new node ( " * " ) ; root -> left -> left = new node ( "5" ) ; root -> left -> right = new node ( " - 4" ) ; root -> right = new node ( " - " ) ; root -> right -> left = new node ( "100" ) ; root -> right -> right = new node ( "20" ) ; cout << eval ( root ) << endl ; delete ( root ) ; root = new node ( " + " ) ; root -> left = new node ( " * " ) ; root -> left -> left = new node ( "5" ) ; root -> left -> right = new node ( "4" ) ; root -> right = new node ( " - " ) ; root -> right -> left = new node ( "100" ) ; root -> right -> right = new node ( " / " ) ; root -> right -> right -> left = new node ( "20" ) ; root -> right -> right -> right = new node ( "2" ) ; cout << eval ( root ) ; return 0 ; }