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

Compile Error

bracketex.cpp:18:49: error: empty character constant
18 | } else if (x == '}' && !s.empty() && s.top() == '') {
| ^~
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()) { cout<<"Invalid" << "\n";
| ^~~
bracketex.cpp:24:5: error: ‘s’ was not declared in this scope
24 | if (s.empty())
| ^
br