Record Detail

Runtime Error

In file included from /in/lab4.c:5:0:
/in/lab4_calculator.h: In function 'calculate':
/in/lab4_calculator.h:18:44: warning: operation on 'top' may be undefined [-Wsequence-point]
             {double res=stack[--top]+stack[--top];
                                            ^~~~~
/in/lab4_calculator.h:21:32: warning: operation on 'top' may be undefined [-Wsequence-point]
             {double res=-stack[--top]+stack[--top];
                                ^~~~~
/in/lab4_calculator.h:24:46: warning: operation on 'top' may be undefined [-Wsequence-point]
             {double res=1/stack[--top]*stack[--top];//fuck C中/与MATLAB不一样
                                              ^~~~~
/in/lab4_calculator.h:27:44: warning: operation on 'top' may be undefined [-Wsequence-point]
             {double res=stack[--top]*stack[--top];
                                            ^~~~~
/in/lab4_calculator.h:30:48: warning: operation on 'top' may be undefined [-Wsequence-point]
             {double res=pow(stack[--top],stack[--top]);
                                                ^~~~~
/in/lab4.c: In function 'main':
/in/lab4.c:50:20: warning: unused variable 'num' [-Wunused-variable]
             double num = atof(arr[a]);//用stdlib.h
                    ^~~
In file included from /in/lab4.c:5:0:
/in/lab4_calculator.h: In function 'calculate':
/in/lab4_calculator.h:35:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# Status Time Cost Memory Cost
#1 Runtime Error (1) Detail 27ms 7.387 MiB

Information

Submit By
Type
Submission
Homework
Lab 4 (TEST ONLY)
Language
C
Submit At
2021-11-07 19:52:59
Judged At
2021-11-21 14:58:36
Judged By
Score
0
Total Time
27ms
Peak Memory
7.387 MiB