About the sum of all the nodes

return root->data + count(root->left->data) + count(root->right->data) we will make this modification in the count function , right?

make a seperate function

int addBT(Node* root)
{
if (root == NULL)
return 0;
return (root->key + addBT(root->left) + addBT(root->right));
}