Record Detail

Compile Error

In file included from /in/Compile/dlist_pre.cpp:2:
In file included from /in/Compile/dlist.h:78:
/in/dlist_impl.h:16:19: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]
    if(this->first=nullptr){
       ~~~~~~~~~~~^~~~~~~~
/in/dlist_impl.h:16:19: note: place parentheses around the assignment to silence this warning
    if(this->first=nullptr){
                  ^
       (                  )
/in/dlist_impl.h:16:19: note: use '==' to turn this assignment into an equality comparison
    if(this->first=nullptr){
                  ^
                  ==
/in/dlist_impl.h:44:48: error: use of undeclared identifier 'np'
    if (this->isEmpty()==0){this->last->next = np;}
                                               ^
/in/dlist_impl.h:45:24: error: use of undeclared identifier 'np'
    else{this->first = np;}
                       ^
/in/dlist_impl.h:46:18: error: use of undeclared identifier 'np'
    this->last = np;
                 ^
/in/dlist_impl.h:94:12: error: use of undeclared identifier 'result'
    return result;
           ^
/in/dlist_impl.h:138:14: error: expected unqualified-id
         node=node->next;
             ^
/in/dlist_impl.h:16:19: error: cannot assign to non-static data member within const member function 'isEmpty'
    if(this->first=nullptr){
       ~~~~~~~~~~~^
/in/Compile/dlist_pre.cpp:12:15: note: in instantiation of member function 'Dlist<int>::isEmpty' requested here
    if(!ilist.isEmpty()) result = -1;
              ^
/in/Compile/dlist.h:18:10: note: member function 'Dlist<int>::isEmpty' is declared const here
    bool isEmpty() const;
         ^
7 errors generated.
/in/Compile/Makefile:29: recipe for target 'buildDlistPretest' failed
make: *** [buildDlistPretest] Error 1

Information

Submit By
Type
Submission
Homework
Project 5
Language
C++
Submit At
2022-12-17 19:15:45
Judged At
2022-12-17 19:15:45
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes