Problem minstack
User zkesong
Submission Time 2024-06-05 22:07:06
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp: In function ‘int getMin()’:
minstack.cpp:5:9: error: ‘minEle’ was not declared in this scope
5 | return minEle;
| ^~~~~~
minstack.cpp: In function ‘int top()’:
minstack.cpp:9:10: error: ‘s’ was not declared in this scope
9 | int t = s.top();
| ^
minstack.cpp:10:7: error: ‘minEle’ was not declared in this scope
10 | (t < minEle) ? return minEle : return t;
| ^~~~~~
minstack.cpp:10:17: error: expected primary-expression before ‘return’
10 | (t < minEle) ? return minEle : return t;
| ^~~~~~
minstack.cpp:10:16: error: expected ‘:’ before ‘return’
10 | (t < minEle) ? return minEle : return t;
| ^~~~~~~
| :
minstack.cpp:10:17: error: expected primary-expression before ‘return’
10 | (t < minEle) ? return minEle : return t;
| ^~~~~~
minstack.cpp: In functi