Problem bracketex
User zyq69
Submission Time 2023-04-21 13:54:52
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:14:4: error: ‘S’ was not declared in this scope
14 | S.push(c);
| ^
bracketex.cpp:17:4: error: ‘S’ was not declared in this scope
17 | S.push(c);
| ^
bracketex.cpp:20:4: error: ‘S’ was not declared in this scope
20 | S.push_back(c);
| ^
bracketex.cpp:23:8: error: ‘S’ was not declared in this scope
23 | if(!S.empty() && S.top() == '('){
| ^
bracketex.cpp:32:8: error: ‘S’ was not declared in this scope
32 | if(!S.empty() && S.top() == '['){
| ^
bracketex.cpp:41:8: error: ‘S’ was not declared in this scope
41 | if(!S.empty() && S.top() == '{'){
| ^
bracketex.cpp:50:5: error: ‘S’ was not declared in this scope
50 | if(S.empt