Problem bracketex
User kahchun
Submission Time 2023-11-03 21:07:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:19:42: error: invalid operands of types ‘void’ and ‘char’ to binary ‘operator!=’
19 | if (s.empty() || (x == ')' && s.pop() != '(') || (x == ']' && s.pop() != '[') || (x == '}' && s.pop() != '{')){
| ~~~~~~~ ^~ ~~~
| | |
| void char
bracketex.cpp:19:74: error: invalid operands of types ‘void’ and ‘char’ to binary ‘operator!=’
19 | if (s.empty() || (x == ')' && s.pop() != '(') || (x == ']' && s.pop() != '[') || (x == '}' && s.pop() != '{')){
| ~~~~~~~ ^~ ~~~
| | |
| void char
bracketex.cpp:19:106: error: invalid operands of types ‘void