Problem lvm
User AltheaZ
Submission Time 2023-07-24 12:01:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lvm.cpp: In function ‘int main()’:
lvm.cpp:22:16: error: no matching function for call to ‘std::stack<int>::push(std::stack<int>&)’
22 | arr.push(reg);
| ^
In file included from /usr/include/c++/9/stack:61,
from lvm.cpp:2:
/usr/include/c++/9/bits/stl_stack.h:233:7: note: candidate: ‘void std::stack<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; std::stack<_Tp, _Sequence>::value_type = int]’
233 | push(const value_type& __x)
| ^~~~
/usr/include/c++/9/bits/stl_stack.h:233:30: note: no known conversion for argument 1 from ‘std::stack<int>’ to ‘const value_type&’ {aka ‘const int&’}
233 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_stack.h:238:7: note: candidate: ‘void std::stack<_Tp, _Sequence>::push(std::stack<_Tp, _S