Find out the maximum sum path from any node to any node in given binary tree

please look into my code. why it is throwing such errors

hi @Anku47 “pair” datatype already exists in c++ so use some other name like Pair or something else

it is again throwing the error

@Anku47 you forgot to change the name of the constructor. This program still wont work becausre you havent declared a tree node and you are not taking input for tree properly either.

it is still saying that node is not declared in this class

@Anku47 as i mentioned above, you did not declare the node class?? then how will the code work? you need to build the tree first and then you can use the function to find the maximum sum path in the tree