Record Detail

Compile Error

/in/calc.cpp:8:42: error: use of undeclared identifier 'str'
        if (int(input[i]) <= 47 || input(str[i]) >= 58) {
                                         ^
/in/calc.cpp:27:9: error: statement requires expression of integer type ('std::__cxx11::string' (aka 'basic_string<char>') invalid)
        switch (input){
        ^       ~~~~~
/in/calc.cpp:43:17: error: redefinition of 'result'
            int result = -(*list.removeFront()) + *list.removeFront();
                ^
/in/calc.cpp:33:17: note: previous definition is here
            int result = *list.removeFront() + *list.removeFront();
                ^
/in/calc.cpp:44:18: error: redefinition of 'newNode'
            int* newNode = new int(result);
                 ^
/in/calc.cpp:34:18: note: previous definition is here
            int* newNode = new int(result);
                 ^
/in/calc.cpp:53:17: error: redefinition of 'result'
            int result = *list.removeFront() * *list.removeFront();
                ^
/in/calc.cpp:33:17: note: previous definition is here
            int result = *list.removeFront() + *list.removeFront();
                ^
/in/calc.cpp:54:18: error: redefinition of 'newNode'
            int* newNode = new int(result);
                 ^
/in/calc.cpp:34:18: note: previous definition is here
            int* newNode = new int(result);
                 ^
/in/calc.cpp:63:43: error: too few arguments to function call, single argument 'op' was not specified
            int first = *list.insertFront();
                         ~~~~~~~~~~~~~~~~ ^
/in/Compile/dlist.h:21:5: note: 'insertFront' declared here
    void insertFront(T *op);
    ^
/in/calc.cpp:69:17: error: redefinition of 'result'
            int result = second / first;
                ^
/in/calc.cpp:33:17: note: previous definition is here
            int result = *list.removeFront() + *list.removeFront();
                ^
/in/calc.cpp:70:18: error: redefinition of 'newNode'
            int* newNode = new int(result);
                 ^
/in/calc.cpp:34:18: note: previous definition is here
            int* newNode = new int(result);
                 ^
/in/calc.cpp:79:18: error: redefinition of 'newNode'
            int* newNode = new int(-(*list.removeFront()));
                 ^
/in/calc.cpp:34:18: note: previous definition is here
            int* newNode = new int(result);
                 ^
/in/calc.cpp:99:14: error: redefinition of 'first'
         int first = *list.removeFront;
             ^
/in/calc.cpp:63:17: note: previous definition is here
            int first = *list.insertFront();
                ^
/in/calc.cpp:99:28: error: reference to non-static member function must be called; did you mean to call it with no arguments?
         int first = *list.removeFront;
                      ~~~~~^~~~~~~~~~~
                                      ()
/in/calc.cpp:100:14: error: redefinition of 'second'
         int second = *list.removeFront;
             ^
/in/calc.cpp:64:17: note: previous definition is here
            int second = *list.removeFront();
                ^
/in/calc.cpp:100:29: error: reference to non-static member function must be called; did you mean to call it with no arguments?
         int second = *list.removeFront;
                       ~~~~~^~~~~~~~~~~
                                       ()
/in/calc.cpp:101:15: error: redefinition of 'newNode1'
         int* newNode1 = new int(first);
              ^
/in/calc.cpp:88:18: note: previous definition is here
            int* newNode1 = new int(victem);
                 ^
/in/calc.cpp:103:15: error: redefinition of 'newNode2'
         int* newNode2 = new int(second);
              ^
/in/calc.cpp:90:18: note: previous definition is here
            int* newNode2 = new int(victem);
                 ^
/in/calc.cpp:111:14: error: redefinition of 'newNode'
        int* newNode = new int(output);
             ^
/in/calc.cpp:34:18: note: previous definition is here
            int* newNode = new int(result);
                 ^
/in/calc.cpp:117:30: error: too few arguments to function call, single argument 'op' was not specified
            list.insertFront();
            ~~~~~~~~~~~~~~~~ ^
/in/Compile/dlist.h:21:5: note: 'insertFront' declared here
    void insertFront(T *op);
    ^
/in/calc.cpp:135:22: error: redefinition of 'newNode'
                int* newNode = new int(stoi(input));
                     ^
/in/calc.cpp:34:18: note: previous definition is here
            int* newNode = new int(result);
                 ^
19 errors generated.
/in/Compile/Makefile:44: recipe for target 'buildCalc' failed
make: *** [buildCalc] Error 1

Information

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