Record Detail

Compile Error

/in/calc.cpp:153:37: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
        if(input == "-" || input[0] != '-' && !(input[0] >= '0' && input[0] <= '9')) {
                        ~~ ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/calc.cpp:153:37: note: place parentheses around the '&&' expression to silence this warning
        if(input == "-" || input[0] != '-' && !(input[0] >= '0' && input[0] <= '9')) {
                                           ^
                           (                                                       )
1 error generated.
/in/Compile/Makefile:44: recipe for target 'buildCalc' failed
make: *** [buildCalc] Error 1

Information

Submit By
Type
Submission
Homework
Project Five: List, Stack, and Queue
Language
C++
Submit At
2018-08-02 09:36:10
Judged At
2018-08-02 09:36:10
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes