Problem bracketex
User ZiErn
Submission Time 2023-11-08 15:03:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bracketex.cpp: In function ‘int main()’:
bracketex.cpp:26:41: error: expected ‘)’ before ']'
26 | else if ((s == ')' || s == '}' || s -- ']') && x.empty())
| ~ ^~~~
| )
bracketex.cpp:27:21: error: expected ‘)’ before ‘;’ token
27 | cout << "Invalid";
| ^
| )
bracketex.cpp:26:11: note: to match this ‘(’
26 | else if ((s == ')' || s == '}' || s -- ']') && x.empty())
| ^
bracketex.cpp: At global scope:
bracketex.cpp:31:2: error: expected unqualified-id before ‘if’
31 | if (x.empty()){
| ^~
bracketex.cpp:34:2: error: expected unqualified-id before ‘else’
34 | else cout << "Invalid";
| ^~~~
bracketex.cpp:36:2: error: expected unqualified-id before ‘return’
36 | return 0;
| ^~~~~~
bracketex.cpp:37:1: error: expe