Problem bracketex
User Kanish
Submission Time 2023-11-09 10:09:36
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp:5:1: error: ‘stack’ does not name a type; did you mean ‘obstack’?
5 | stack<char> s;
| ^~~~~
| obstack
bracketex.cpp: In function ‘int main()’:
bracketex.cpp:13:2: error: ‘s’ was not declared in this scope
13 | s.push(x);
| ^
bracketex.cpp:14:25: error: ‘s’ was not declared in this scope
14 | } else if (x == ')' && !s.empty() && s.top() == '(') {
| ^
bracketex.cpp:20:41: error: lvalue required as left operand of assignment
20 | } else if ((x == ')' || x = ']' || x == '}') && s.empty()) {
| ^~~
bracketex.cpp:26:5: error: ‘s’ was not declared in this scope
26 | if (s.empty())
| ^
bracketex.cpp:30:1: error: expected primary-expression before ‘}’ token
30 | }
| ^
bracketex.cpp: At global scope:
bracketex.cpp:31:1: error: ‘cout’ does not name a type
31 | cout<<"Invalid