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

Compile Error

minstack.cpp: In function ‘void getMin()’:
minstack.cpp:5:9: error: ‘minEle’ was not declared in this scope
5 | return minEle;
| ^~~~~~
minstack.cpp:5:9: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
minstack.cpp: In function ‘void 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 |