Problem bracketstack
User R9q5P8
Submission Time 2025-11-18 10:35:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketstack.cpp: In function ‘int main()’:
bracketstack.cpp:20:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
20 | if (p == "(")
| ^~~
bracketstack.cpp:28:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
28 | if (bracket[bracket.size()-1] == "(")
| ^~~
bracketstack.cpp:34:15: error: no match for ‘operator==’ (operand types are ‘std::vector<int>’ and ‘int’)
34 | if (bracket == 0)
| ~~~~~~~ ^~ ~
| | |
| | int
| std::vector<int>
In file included from /usr/include/c++/9/iosfwd:40,
from /usr/include/c++/9/ios:38,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from bracketstack.cpp:1:
/usr/include/c++/9/bits/postypes.h:222:5: no