Record Detail

Compile Error

/in/calc.cpp:52:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
}
^
/in/calc.cpp:134:21: error: cannot jump from switch statement to this case label
                    default:
                    ^
/in/calc.cpp:128:30: note: jump bypasses variable initialization
                        int *divideNumber = new int(*pop2 / *pop1);
                             ^
/in/calc.cpp:122:30: note: jump bypasses variable initialization
                        int *pop2 = stack.removeBack();
                             ^
/in/calc.cpp:117:30: note: jump bypasses variable initialization
                        int *pop1 = stack.removeBack();
                             ^
/in/calc.cpp:109:30: note: jump bypasses variable initialization
                        int *multiplyNumber = new int(*pop2 * *pop1);
                             ^
/in/calc.cpp:95:30: note: jump bypasses variable initialization
                        int *substractNumber = new int (*pop2 - *pop1);
                             ^
/in/calc.cpp:81:30: note: jump bypasses variable initialization
                        int *addNumber = new int(*pop1 + *pop2);
                             ^
/in/calc.cpp:115:21: error: cannot jump from switch statement to this case label
                    case '/':
                    ^
/in/calc.cpp:109:30: note: jump bypasses variable initialization
                        int *multiplyNumber = new int(*pop2 * *pop1);
                             ^
/in/calc.cpp:95:30: note: jump bypasses variable initialization
                        int *substractNumber = new int (*pop2 - *pop1);
                             ^
/in/calc.cpp:81:30: note: jump bypasses variable initialization
                        int *addNumber = new int(*pop1 + *pop2);
                             ^
/in/calc.cpp:101:21: error: cannot jump from switch statement to this case label
                    case '*':
                    ^
/in/calc.cpp:95:30: note: jump bypasses variable initialization
                        int *substractNumber = new int (*pop2 - *pop1);
                             ^
/in/calc.cpp:81:30: note: jump bypasses variable initialization
                        int *addNumber = new int(*pop1 + *pop2);
                             ^
/in/calc.cpp:87:21: error: cannot jump from switch statement to this case label
                    case '-':
                    ^
/in/calc.cpp:81:30: note: jump bypasses variable initialization
                        int *addNumber = new int(*pop1 + *pop2);
                             ^
5 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
2024-12-22 16:38:39
Judged At
2024-12-22 16:38:39
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes