Record Detail

Compile Error

/in/lab5.c: In function 'evaluatePostfix':
/in/lab5.c:165:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < strlen(postfix); i++) {
                       ^
/in/lab5.c:171:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             while (i < strlen(postfix) && (isdigit2(postfix[i]) || postfix[i] == '.' || postfix[i] == '-')) {
                      ^
/in/lab5.c: In function 'replaceVariables':
/in/lab5.c:269:18: error: 'MAX_VARIABLE_NAME_LENGTH' undeclared (first use in this function); did you mean 'MAX_EXPRESSION_LENGTH'?
     char varName[MAX_VARIABLE_NAME_LENGTH];
                  ^~~~~~~~~~~~~~~~~~~~~~~~
                  MAX_EXPRESSION_LENGTH
/in/lab5.c:269:18: note: each undeclared identifier is reported only once for each function it appears in
/in/lab5.c:276:54: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
             if (i == len - 1 || !(expr[i + 1] >= 'A' && expr[i + 1] <= 'Z' || expr[i + 1] >= 'a' && expr[i + 1] <= 'z' || expr[i + 1] >= '0' && expr[i + 1] <= '9')) {
                                   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/in/lab5.c:276:142: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
             if (i == len - 1 || !(expr[i + 1] >= 'A' && expr[i + 1] <= 'Z' || expr[i + 1] >= 'a' && expr[i + 1] <= 'z' || expr[i + 1] >= '0' && expr[i + 1] <= '9')) {
                                                                                                                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/in/lab5.c:269:10: warning: unused variable 'varName' [-Wunused-variable]
     char varName[MAX_VARIABLE_NAME_LENGTH];
          ^~~~~~~

Information

Submit By
Type
Submission
Homework
Lab 5: CASIO-fx991
Language
C
Submit At
2024-11-15 17:20:42
Judged At
2024-11-15 17:20:42
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes