Record Detail

Compile Error

In file included from /in/Compile/BinarySearchTree_compile_check.cpp:4:0:
/in/BinarySearchTree.h: In instantiation of 'static void BinarySearchTree<T, Compare>::traverse_inorder_impl(const BinarySearchTree<T, Compare>::Node*, std::ostream&) [with T = int; Compare = std::less<int>; std::ostream = std::basic_ostream<char>]':
/in/BinarySearchTree.h:132:26:   required from 'void BinarySearchTree<T, Compare>::traverse_inorder(std::ostream&) const [with T = int; Compare = std::less<int>; std::ostream = std::basic_ostream<char>]'
/in/Compile/BinarySearchTree_compile_check.cpp:83:35:   required from here
/in/BinarySearchTree.h:521:19: error: 'const struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
       os << node->data << " ";
             ~~~~~~^~~~
             datum
/in/BinarySearchTree.h: In instantiation of 'static void BinarySearchTree<T, Compare>::traverse_inorder_impl(const BinarySearchTree<T, Compare>::Node*, std::ostream&) [with T = Duck; Compare = DuckWealthLess; std::ostream = std::basic_ostream<char>]':
/in/BinarySearchTree.h:132:26:   required from 'void BinarySearchTree<T, Compare>::traverse_inorder(std::ostream&) const [with T = Duck; Compare = DuckWealthLess; std::ostream = std::basic_ostream<char>]'
/in/Compile/BinarySearchTree_compile_check.cpp:84:40:   required from here
/in/BinarySearchTree.h:521:19: error: 'const struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
       os << node->data << " ";
             ~~~~~~^~~~
             datum
/in/BinarySearchTree.h: In instantiation of 'static void BinarySearchTree<T, Compare>::traverse_preorder_impl(const BinarySearchTree<T, Compare>::Node*, std::ostream&) [with T = int; Compare = std::less<int>; std::ostream = std::basic_ostream<char>]':
/in/BinarySearchTree.h:140:27:   required from 'void BinarySearchTree<T, Compare>::traverse_preorder(std::ostream&) const [with T = int; Compare = std::less<int>; std::ostream = std::basic_ostream<char>]'
/in/Compile/BinarySearchTree_compile_check.cpp:86:36:   required from here
/in/BinarySearchTree.h:537:19: error: 'const struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
       os << node->data << " ";
             ~~~~~~^~~~
             datum
/in/BinarySearchTree.h: In instantiation of 'static void BinarySearchTree<T, Compare>::traverse_preorder_impl(const BinarySearchTree<T, Compare>::Node*, std::ostream&) [with T = Duck; Compare = DuckWealthLess; std::ostream = std::basic_ostream<char>]':
/in/BinarySearchTree.h:140:27:   required from 'void BinarySearchTree<T, Compare>::traverse_preorder(std::ostream&) const [with T = Duck; Compare = DuckWealthLess; std::ostream = std::basic_ostream<char>]'
/in/Compile/BinarySearchTree_compile_check.cpp:87:41:   required from here
/in/BinarySearchTree.h:537:19: error: 'const struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
       os << node->data << " ";
             ~~~~~~^~~~
             datum
In file included from /in/Compile/BinarySearchTree_compile_check.cpp:4:0:
/in/BinarySearchTree.h: In instantiation of 'static bool BinarySearchTree<T, Compare>::check_sorting_invariant_impl(const BinarySearchTree<T, Compare>::Node*, Compare) [with T = int; Compare = std::less<int>]':
/in/BinarySearchTree.h:148:40:   required from 'bool BinarySearchTree<T, Compare>::check_sorting_invariant() const [with T = int; Compare = std::less<int>]'
/in/Compile/BinarySearchTree_compile_check.cpp:89:42:   required from here
/in/BinarySearchTree.h:503:65: error: 'const struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
       bool leftSorted = (node->left == nullptr) || (!less(node->data, node->left->data) && check_sorting_invariant_impl(node->left, less));
                                                           ~~~~~~^~~~
                                                           datum
/in/BinarySearchTree.h:503:83: error: 'struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
       bool leftSorted = (node->left == nullptr) || (!less(node->data, node->left->data) && check_sorting_invariant_impl(node->left, less));
                                                                       ~~~~~~~~~~~~^~~~
                                                                       datum
In file included from /in/Compile/BinarySearchTree_compile_check.cpp:4:0:
/in/BinarySearchTree.h:504:74: error: 'struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
       bool rightSorted = (node->right == nullptr) || (!less(node->right->data, node->data) && check_sorting_invariant_impl(node->right, less));
                                                             ~~~~~~~~~~~~~^~~~
                                                             datum
/in/BinarySearchTree.h:504:86: error: 'const struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
       bool rightSorted = (node->right == nullptr) || (!less(node->right->data, node->data) && check_sorting_invariant_impl(node->right, less));
                                                                                ~~~~~~^~~~
                                                                                datum
In file included from /in/Compile/BinarySearchTree_compile_check.cpp:4:0:
/in/BinarySearchTree.h: In instantiation of 'static bool BinarySearchTree<T, Compare>::check_sorting_invariant_impl(const BinarySearchTree<T, Compare>::Node*, Compare) [with T = Duck; Compare = DuckWealthLess]':
/in/BinarySearchTree.h:148:40:   required from 'bool BinarySearchTree<T, Compare>::check_sorting_invariant() const [with T = Duck; Compare = DuckWealthLess]'
/in/Compile/BinarySearchTree_compile_check.cpp:90:47:   required from here
/in/BinarySearchTree.h:503:65: error: 'const struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
       bool leftSorted = (node->left == nullptr) || (!less(node->data, node->left->data) && check_sorting_invariant_impl(node->left, less));
                                                           ~~~~~~^~~~
                                                           datum
/in/BinarySearchTree.h:503:83: error: 'struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
       bool leftSorted = (node->left == nullptr) || (!less(node->data, node->left->data) && check_sorting_invariant_impl(node->left, less));
                                                                       ~~~~~~~~~~~~^~~~
                                                                       datum
In file included from /in/Compile/BinarySearchTree_compile_check.cpp:4:0:
/in/BinarySearchTree.h:504:74: error: 'struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
       bool rightSorted = (node->right == nullptr) || (!less(node->right->data, node->data) && check_sorting_invariant_impl(node->right, less));
                                                             ~~~~~~~~~~~~~^~~~
                                                             datum
/in/BinarySearchTree.h:504:86: error: 'const struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
       bool rightSorted = (node->right == nullptr) || (!less(node->right->data, node->data) && check_sorting_invariant_impl(node->right, less));
                                                                                ~~~~~~^~~~
                                                                                datum
In file included from /in/Compile/BinarySearchTree_compile_check.cpp:4:0:
/in/BinarySearchTree.h: In instantiation of 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::find_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = int; Compare = std::less<int>]':
/in/BinarySearchTree.h:277:36:   required from 'BinarySearchTree<T, Compare>::Iterator BinarySearchTree<T, Compare>::find(const T&) const [with T = int; Compare = std::less<int>]'
/in/Compile/BinarySearchTree_compile_check.cpp:104:25:   required from here
/in/BinarySearchTree.h:414:35: error: 'struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
     } else if (!less(query, node->data) && !less(node->data, query)) {
                             ~~~~~~^~~~
                             datum
/in/BinarySearchTree.h:414:56: error: 'struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
     } else if (!less(query, node->data) && !less(node->data, query)) {
                                                  ~~~~~~^~~~
                                                  datum
/in/BinarySearchTree.h:417:34: error: 'struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
     } else if (less(query, node->data)) {
                            ~~~~~~^~~~
                            datum
/in/BinarySearchTree.h: In instantiation of 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::find_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = Duck; Compare = DuckWealthLess]':
/in/BinarySearchTree.h:277:36:   required from 'BinarySearchTree<T, Compare>::Iterator BinarySearchTree<T, Compare>::find(const T&) const [with T = Duck; Compare = DuckWealthLess]'
/in/Compile/BinarySearchTree_compile_check.cpp:105:40:   required from here
/in/BinarySearchTree.h:414:35: error: 'struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
     } else if (!less(query, node->data) && !less(node->data, query)) {
                             ~~~~~~^~~~
                             datum
/in/BinarySearchTree.h:414:56: error: 'struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
     } else if (!less(query, node->data) && !less(node->data, query)) {
                                                  ~~~~~~^~~~
                                                  datum
/in/BinarySearchTree.h:417:34: error: 'struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
     } else if (less(query, node->data)) {
                            ~~~~~~^~~~
                            datum
In file included from /in/Compile/BinarySearchTree_compile_check.cpp:4:0:
/in/BinarySearchTree.h: In instantiation of 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::min_greater_than_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = int; Compare = std::less<int>]':
/in/BinarySearchTree.h:263:48:   required from 'BinarySearchTree<T, Compare>::Iterator BinarySearchTree<T, Compare>::min_greater_than(const T&) const [with T = int; Compare = std::less<int>]'
/in/Compile/BinarySearchTree_compile_check.cpp:110:37:   required from here
/in/BinarySearchTree.h:560:32: error: 'struct BinarySearchTree<int>::Node' has no member named 'data'; did you mean 'datum'?
     } else if (less(val, node->data)) {
                          ~~~~~~^~~~
                          datum
/in/BinarySearchTree.h: In instantiation of 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::min_greater_than_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = Duck; Compare = DuckWealthLess]':
/in/BinarySearchTree.h:263:48:   required from 'BinarySearchTree<T, Compare>::Iterator BinarySearchTree<T, Compare>::min_greater_than(const T&) const [with T = Duck; Compare = DuckWealthLess]'
/in/Compile/BinarySearchTree_compile_check.cpp:111:52:   required from here
/in/BinarySearchTree.h:560:32: error: 'struct BinarySearchTree<Duck, DuckWealthLess>::Node' has no member named 'data'; did you mean 'datum'?
     } else if (less(val, node->data)) {
                          ~~~~~~^~~~
                          datum
In file included from /in/Compile/BinarySearchTree_compile_check.cpp:4:0:
/in/BinarySearchTree.h: In static member function 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::find_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = int; Compare = std::less<int>]':
/in/BinarySearchTree.h:424:3: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
/in/BinarySearchTree.h: In static member function 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::find_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = Duck; Compare = DuckWealthLess]':
/in/BinarySearchTree.h:424:3: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
In file included from /in/Compile/BinarySearchTree_compile_check.cpp:4:0:
/in/BinarySearchTree.h: In static member function 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::min_greater_than_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = int; Compare = std::less<int>]':
/in/BinarySearchTree.h:568:3: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
/in/BinarySearchTree.h: In static member function 'static BinarySearchTree<T, Compare>::Node* BinarySearchTree<T, Compare>::min_greater_than_impl(BinarySearchTree<T, Compare>::Node*, const T&, Compare) [with T = Duck; Compare = DuckWealthLess]':
/in/BinarySearchTree.h:568:3: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
cc1plus: all warnings being treated as errors
/in/Compile/Makefile:30: recipe for target 'BinarySearchTree_compile_check.exe' failed
make: *** [BinarySearchTree_compile_check.exe] Error 1

Information

Submit By
Type
Submission
Homework
Project 5
Language
C++
Submit At
2024-07-05 21:54:08
Judged At
2024-07-05 21:54:08
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes