Problem bracketex
User YongXin
Submission Time 2023-06-06 12:50:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:10:8: error: class template argument deduction failed:
10 | stack s;
| ^
bracketex.cpp:10:8: error: no matching function for call to ‘stack()’
In file included from /usr/include/c++/9/stack:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:89,
from bracketex.cpp:1:
/usr/include/c++/9/bits/stl_stack.h:290:5: note: candidate: ‘template<class _Container, class> std::stack(_Container)-> std::stack<typename _Container::value_type, _Container>’
290 | stack(_Container) -> stack<typename _Container::value_type, _Container>;
| ^~~~~
/usr/include/c++/9/bits/stl_stack.h:290:5: note: template argument deduction/substitution failed:
bracketex.cpp:10:8: note: candidate expects 1 argument, 0 provided
10 | stack s;
| ^
In file included from /usr/include/c++/9/stack:61,