Driver program to test above functions
int main ( ) { Node * root = newNode ( 1 ) ; root -> left = newNode ( 2 ) ; root -> right = newNode ( 3 ) ; root -> left -> left = newNode ( 4 ) ; root -> left -> right = newNode ( 5 ) ; root -> right -> left = newNode ( 6 ) ; root -> right -> right = newNode ( 7 ) ; root -> right -> left -> right = newNode ( 8 ) ; int sum = addBT ( root ) ; cout << " Sum ▁ of ▁ all ▁ the ▁ elements ▁ is : ▁ " << sum << endl ; return 0 ; }