Problem lvm
User Yizhou
Submission Time 2024-05-30 20:12:41
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lvm.cpp:4:1: error: expected ‘,’ or ‘;’ before ‘stack’
4 | stack<int>s;
| ^~~~~
lvm.cpp: In function ‘int main()’:
lvm.cpp:9:19: error: cannot convert ‘std::pair<std::__cxx11::basic_string<char>, int>*’ to ‘int*’ in initialization
9 | int *arr_pointer=arr;
| ^~~
| |
| std::pair<std::__cxx11::basic_string<char>, int>*
lvm.cpp:18:23: error: invalid types ‘std::pair<std::__cxx11::basic_string<char>, int> [1010][int*]’ for array subscript
18 | while(arr[arr_pointer].first!="DONE"){
| ^
lvm.cpp:19:21: error: invalid types ‘std::pair<std::__cxx11::basic_string<char>, int> [1010][int*]’ for array subscript
19 | if(arr[arr_pointer].first=="PUSH"){
| ^
lvm.cpp:20:4: error: ‘s’ was not declared in this scope
20 | s.push(arr[arr_pointer].secon