Record Detail

Compile Error

/in/p2.cpp: In function 'bool memberOf(list_t, int)':
/in/p2.cpp:15:89: error: too few arguments to function 'bool memberOf(list_t, int)'
     return list_isEmpty(list)?false:(list_first(list)==val?true:memberOf(list_rest(list)));
                                                                                         ^
/in/p2.cpp:13:6: note: declared here
 bool memberOf(list_t list, int val)
      ^~~~~~~~
/in/p2.cpp: At global scope:
/in/p2.cpp:41:1: error: expected unqualified-id before '{' token
 {
 ^
/in/p2.cpp: In function 'opaque_list* filter_odd(list_t)':
/in/p2.cpp:54:12: error: 'make_list' was not declared in this scope
     return make_list(list_first(list),filter_odd(list_rest(list)));
            ^~~~~~~~~
/in/p2.cpp:54:12: note: suggested alternative: 'va_list'
     return make_list(list_first(list),filter_odd(list_rest(list)));
            ^~~~~~~~~
            va_list
/in/p2.cpp: In function 'opaque_list* filter(list_t, bool (*)(int))':
/in/p2.cpp:62:61: error: too few arguments to function 'opaque_list* filter(list_t, bool (*)(int))'
     return make_list(list_first(list),filter(list_rest(list)));
                                                             ^
/in/p2.cpp:59:8: note: declared here
 list_t filter(list_t list, bool (*fn)(int))
        ^~~~~~
/in/p2.cpp:62:12: error: 'make_list' was not declared in this scope
     return make_list(list_first(list),filter(list_rest(list)));
            ^~~~~~~~~
/in/p2.cpp:62:12: note: suggested alternative: 'va_list'
     return make_list(list_first(list),filter(list_rest(list)));
            ^~~~~~~~~
            va_list
/in/p2.cpp:64:34: error: too few arguments to function 'opaque_list* filter(list_t, bool (*)(int))'
     return filter(list_rest(list));
                                  ^
/in/p2.cpp:59:8: note: declared here
 list_t filter(list_t list, bool (*fn)(int))
        ^~~~~~
/in/p2.cpp: In function 'opaque_list* unique(list_t)':
/in/p2.cpp:79:5: error: expected ',' or ';' before 'return'
     return list_make(d,ki);
     ^~~~~~
/in/p2.cpp:78:12: warning: unused variable 'ki' [-Wunused-variable]
     list_t ki=uniquen(list_rest(list),d)
            ^~
/in/p2.cpp:81:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
/in/p2.cpp: In function 'opaque_list* insert_list(list_t, list_t, unsigned int)':
/in/p2.cpp:87:15: error: 'insert' was not declared in this scope
     list_t ki=insert(list_rest(first),second,n-1);
               ^~~~~~
/in/p2.cpp:87:15: note: suggested alternative: 'qsort'
     list_t ki=insert(list_rest(first),second,n-1);
               ^~~~~~
               qsort
/in/p2.cpp: In function 'opaque_list* chop(list_t, unsigned int)':
/in/p2.cpp:93:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if(d<=n)return list_make();
        ~^~~
/in/p2.cpp: In function 'bool tree_search(tree_t, int)':
/in/p2.cpp:105:59: error: too few arguments to function 'bool tree_search(tree_t, int)'
     return tree_elt(tree)==val|tree_search(tree_left(tree))|tree_search(tree_right(tree));
                                                           ^
/in/p2.cpp:102:6: note: declared here
 bool tree_search(tree_t tree, int val)
      ^~~~~~~~~~~
/in/p2.cpp:105:89: error: too few arguments to function 'bool tree_search(tree_t, int)'
     return tree_elt(tree)==val|tree_search(tree_left(tree))|tree_search(tree_right(tree));
                                                                                         ^
/in/p2.cpp:102:6: note: declared here
 bool tree_search(tree_t tree, int val)
      ^~~~~~~~~~~
/in/p2.cpp: In function 'opaque_list* traversal(tree_t)':
/in/p2.cpp:124:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^

Information

Submit By
Type
Submission
Homework
Project 2
Language
C++
Submit At
2024-11-02 23:52:46
Judged At
2024-11-02 23:52:46
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes