Record Detail

Compile Error

/in/p2.cpp: In function 'bool tree_hasMonotonicPath_helper(tree_t, bool)':
/in/p2.cpp:192:103: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
                    (increasing ? tree_elt(tree_left(tree)) >= elt : tree_elt(tree_left(tree)) <= elt) &&
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
                    tree_hasMonotonicPath_helper(tree_left(tree), increasing);
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                           
/in/p2.cpp:195:106: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
                     (increasing ? tree_elt(tree_right(tree)) >= elt : tree_elt(tree_right(tree)) <= elt) &&
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
                     tree_hasMonotonicPath_helper(tree_right(tree), increasing);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                            
/in/p2.cpp: In function 'opaque_tree* insert_tree(int, tree_t)':
/in/p2.cpp:258:93: error: expected ')' before ';' token
         return tree_make(tree_elt(tree), tree_left(tree), insert_tree(elt, tree_right(tree));
                                                                                             ^

Information

Submit By
Type
Submission
Homework
Project 2
Language
C++
Submit At
2024-10-29 15:17:21
Judged At
2024-10-29 15:17:21
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes