Problem bracketex
User ZiErn
Submission Time 2023-11-08 14:36:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:15:6: error: request for member ‘push’ in ‘s’, which is of non-class type ‘char’
15 | s.push(s);
| ^~~~
bracketex.cpp:17:26: error: request for member ‘top’ in ‘s’, which is of non-class type ‘char’
17 | else if (s == ')' && s.top() == '('){
| ^~~
bracketex.cpp:18:6: error: request for member ‘pop’ in ‘s’, which is of non-class type ‘char’
18 | s.pop();
| ^~~
bracketex.cpp:20:26: error: request for member ‘top’ in ‘s’, which is of non-class type ‘char’
20 | else if (s == '}' && s.top() == '{'){
| ^~~
bracketex.cpp:21:6: error: request for member ‘pop’ in ‘s’, which is of non-class type ‘char’
21 | s.pop();
| ^~~
bracketex.cpp:23:26: error: request for member ‘top’ in ‘s’, which is of non-class type ‘char’
23 | else if (s == ']' && s.top() == '['){