/in/ex6.cpp: In member function 'int BinaryTree::sum() const':
/in/ex6.cpp:45:21: error: 'rightSum' was not declared in this scope
int sumOfTree = rightSum = leftSum = 0;
^~~~~~~~
/in/ex6.cpp:45:32: error: 'leftSum' was not declared in this scope
int sumOfTree = rightSum = leftSum = 0;
^~~~~~~
/in/ex6.cpp:58:9: error: redeclaration of 'int sumOfTree'
int sumOfTree = root->val + leftSum + rightSum;
^~~~~~~~~
/in/ex6.cpp:45:9: note: 'int sumOfTree' previously declared here
int sumOfTree = rightSum = leftSum = 0;
^~~~~~~~~
/in/ex6.cpp: In member function 'int BinaryTree::depth() const':
/in/ex6.cpp:81:5: error: expected ',' or ';' before 'std'
std::cout << depthOfTree;
^~~
/in/compile/Makefile:69: recipe for target 'ex6.o' failed
make: *** [ex6.o] Error 1