Problem | bracketex |
---|---|
User | vince |
Submission Time | 2023-11-08 16:02:38 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
bracketex.cpp: In function ‘int32_t main()’:
bracketex.cpp:15:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
15 | if (S[i] == "("){
| ^~~
bracketex.cpp:16:16: error: no matching function for call to ‘std::stack<std::__cxx11::basic_string<char> >::push(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)’
16 | s1.push(S[i]);
| ^
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:233:7: note: candidate: ‘void std::stack<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::__cxx11::basic_string<char>; _Sequence = std::deque<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char> > >; std::stack<_Tp, _Sequence>::value