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

Compile Error

bracketex.cpp:17:49: error: empty character constant
17 | } else if (x == '}' && !s.empty() && s.top() == '') {
| ^~
bracketex.cpp:4:1: error: ‘stack’ does not name a type; did you mean ‘obstack’?
4 | stack<char> s;
| ^~~~~
| obstack
bracketex.cpp: In function ‘int main()’:
bracketex.cpp:8:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
8 | cin >> n;
| ^~~
| std::cin
In file included from bracketex.cpp:2:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
bracketex.cpp:12:2: error: ‘s’ was not declared in this scope
12 | s.push(x);
| ^
bracketex.cpp:13:25: error: ‘s’ was not declared in this scope
13 | } else if (x == ')' && !s.empty() && s.top() == '(') {
|