Record Detail

Compile Error

/in/ex6.cpp:76:49: error: no 'int BinaryTree::tree_sum_helper(TreeNode*) const' member function declared in class 'BinaryTree'
 int BinaryTree::tree_sum_helper(TreeNode *root) const
                                                 ^~~~~
/in/ex6.cpp: In member function 'int BinaryTree::sum() const':
/in/ex6.cpp:87:12: error: 'tree_sum_helper' was not declared in this scope
     return tree_sum_helper(root);
            ^~~~~~~~~~~~~~~
/in/ex6.cpp: At global scope:
/in/ex6.cpp:95:51: error: no 'int BinaryTree::tree_depth_helper(TreeNode*) const' member function declared in class 'BinaryTree'
 int BinaryTree::tree_depth_helper(TreeNode *root) const
                                                   ^~~~~
/in/ex6.cpp: In member function 'int BinaryTree::depth() const':
/in/ex6.cpp:106:12: error: 'tree_depth_helper' was not declared in this scope
     return tree_depth_helper(root);
            ^~~~~~~~~~~~~~~~~
/in/ex6.cpp: At global scope:
/in/ex6.cpp:90:12: error: 'int max(int, int)' defined but not used [-Werror=unused-function]
 static int max(int a, int b)
            ^~~
cc1plus: all warnings being treated as errors
/in/compile/Makefile:24: recipe for target 'ex6.o' failed
make: *** [ex6.o] Error 1

Information

Submit By
Type
Submission
Homework
Exercise6
Language
C++
Submit At
2024-04-20 13:28:37
Judged At
2024-04-20 13:28:37
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes