Record Detail

Compile Error

/in/calc.cpp:22:13: error: assigning to 'int' from incompatible type 'int *'; dereference with *
    b=stack.removeFront();
      ~~~~~~^~~~~~~~~~~~~
      *
/in/calc.cpp:24:19: error: indirection requires pointer operand ('int' invalid)
    *result=(*a)+(*b);
                  ^~
/in/calc.cpp:27:5: error: cannot delete expression of type 'int'
    delete b;
    ^      ~
/in/calc.cpp:33:13: error: assigning to 'int' from incompatible type 'int *'; dereference with *
    b=stack.removeFront();
      ~~~~~~^~~~~~~~~~~~~
      *
/in/calc.cpp:35:14: error: indirection requires pointer operand ('int' invalid)
    *result=(*b)-(*a);
             ^~
/in/calc.cpp:38:5: error: cannot delete expression of type 'int'
    delete b;
    ^      ~
/in/calc.cpp:44:13: error: assigning to 'int' from incompatible type 'int *'; dereference with *
    b=stack.removeFront();
      ~~~~~~^~~~~~~~~~~~~
      *
/in/calc.cpp:46:19: error: indirection requires pointer operand ('int' invalid)
    *result=(*a)*(*b);
                  ^~
/in/calc.cpp:49:5: error: cannot delete expression of type 'int'
    delete b;
    ^      ~
/in/calc.cpp:55:13: error: assigning to 'int' from incompatible type 'int *'; dereference with *
    b=stack.removeFront();
      ~~~~~~^~~~~~~~~~~~~
      *
/in/calc.cpp:58:27: error: cannot initialize a parameter of type 'int *' with an lvalue of type 'int'
        stack.insertFront(b);
                          ^
/in/Compile/dlist.h:21:25: note: passing argument to parameter 'op' here
    void insertFront(T *op);
                        ^
/in/calc.cpp:63:14: error: indirection requires pointer operand ('int' invalid)
    *result=(*b)/(*a);
             ^~
/in/calc.cpp:66:5: error: cannot delete expression of type 'int'
    delete b;
    ^      ~
/in/calc.cpp:88:13: error: assigning to 'int' from incompatible type 'int *'; dereference with *
    b=stack.removeFront();
      ~~~~~~^~~~~~~~~~~~~
      *
/in/calc.cpp:90:23: error: cannot initialize a parameter of type 'int *' with an lvalue of type 'int'
    stack.insertFront(b);
                      ^
/in/Compile/dlist.h:21:25: note: passing argument to parameter 'op' here
    void insertFront(T *op);
                        ^
/in/calc.cpp:134:13: error: statement requires expression of integer type ('std::__cxx11::string' (aka 'basic_string<char>') invalid)
            switch (input){
            ^       ~~~~~
/in/calc.cpp:139:33: error: reference to 'minus' is ambiguous
                operate(stack,2,minus);
                                ^
/in/calc.cpp:30:6: note: candidate found by name lookup is 'minus'
void minus(Dlist<int> &stack){
     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_function.h:177:12: note: candidate found by name lookup is 'std::minus'
    struct minus : public binary_function<_Tp, _Tp, _Tp>
           ^
/in/calc.cpp:148:33: error: reference to 'negate' is ambiguous
                operate(stack,1,negate);
                                ^
/in/calc.cpp:69:6: note: candidate found by name lookup is 'negate'
void negate(Dlist<int> &stack){
     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_function.h:217:12: note: candidate found by name lookup is 'std::negate'
    struct negate : public unary_function<_Tp, _Tp>
           ^
/in/calc.cpp:160:23: error: cannot refer to class template 'Dlist' without a template argument list
                stack=Dlist();
                      ^
/in/Compile/dlist.h:10:7: note: template is declared here
class Dlist
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
/in/Compile/Makefile:44: recipe for target 'buildCalc' failed
make: *** [buildCalc] Error 1

Information

Submit By
Type
Submission
Homework
Project5
Language
C++
Submit At
2024-04-29 20:58:20
Judged At
2024-04-29 20:58:20
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes