Record Detail

Compile Error

/in/ex6.cpp:87:41: error: no 'int BinaryTree::shelper(TreeNode*) const' member function declared in class 'BinaryTree'
 int BinaryTree::shelper(TreeNode* root) const{
                                         ^~~~~
/in/ex6.cpp: In member function 'int BinaryTree::sum() const':
/in/ex6.cpp:96:12: error: 'shelper' was not declared in this scope
     return shelper(root);
            ^~~~~~~
/in/ex6.cpp:96:12: note: suggested alternative: 'sumhelper'
     return shelper(root);
            ^~~~~~~
            sumhelper
/in/ex6.cpp: At global scope:
/in/ex6.cpp:99:41: error: no 'int BinaryTree::dhelper(TreeNode*) const' member function declared in class 'BinaryTree'
 int BinaryTree::dhelper(TreeNode* root) const{
                                         ^~~~~
/in/ex6.cpp: In member function 'int BinaryTree::depth() const':
/in/ex6.cpp:109:12: error: 'dhelper' was not declared in this scope
     return dhelper(root);
            ^~~~~~~
/in/ex6.cpp:109:12: note: suggested alternative: 'sumhelper'
     return dhelper(root);
            ^~~~~~~
            sumhelper
/in/ex6.cpp: At global scope:
/in/ex6.cpp:112:59: error: no 'void BinaryTree::oshelper(std::ostream&, TreeNode*) const' member function declared in class 'BinaryTree'
 void BinaryTree::oshelper(std::ostream &os,TreeNode* root)const{
                                                           ^~~~~
/in/ex6.cpp: In function 'std::ostream& operator<<(std::ostream&, const BinaryTree&)':
/in/ex6.cpp:122:10: error: 'const class BinaryTree' has no member named 'oshelper'; did you mean 'sumhelper'?
     tree.oshelper(os,tree.root);
          ^~~~~~~~
          sumhelper
/in/compile/Makefile:69: recipe for target 'ex6.o' failed
make: *** [ex6.o] Error 1

Information

Submit By
Type
Submission
Homework
Exercise 6
Language
C++
Submit At
2024-12-19 19:18:45
Judged At
2024-12-19 19:18:45
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes