Problem bracketex
User emyz
Submission Time 2023-12-06 02:52:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:16:27: error: cannot convert ‘std::stack<char>::empty’ from type ‘bool (std::stack<char>::)() const’ to type ‘bool’
16 | else if (idk==')' && !s.empty && s.top=='(')
| ^~~~~
bracketex.cpp:16:27: error: in argument to unary !
bracketex.cpp:16:41: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘char’ to binary ‘operator==’
16 | else if (idk==')' && !s.empty && s.top=='(')
| ~~~~~^~~~~
| | |
| | char
| <unresolved overloaded function type>
bracketex.cpp:20:27: error: cannot convert ‘std::stack<char>::empty’ from type ‘bool (std::stack<char>::)() const’ to type ‘bool’
20 | else if (idk=='[' && !s.empty && s.top==']')