foo.cc:37:34: warning: multi-character character constant [-Wmultichar]
37 | char L = '/0';//左括号
| ^~~~
foo.cc:38:34: warning: multi-character character constant [-Wmultichar]
38 | char R = '/0';//右括号
| ^~~~
foo.cc: In member function 'void LinkStack::push(char)':
foo.cc:15:17: error: 'stack' was not declared in this scope
15 | stack[most] = x;
| ^~~~~
foo.cc:4:1: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
3 | #include <string>
+++ |+#include <stack>
4 | using namespace std;
foo.cc: In member function 'int LinkStack::pop()':
foo.cc:19:26: error: 'stack' was not declared in this scope
19 | char x = stack[most];
| ^~~~~
foo.cc:19:26: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
foo.cc: In member function 'void LinkStack::Match(char*)':
foo.cc:37:34: warning: overflow in conversion from 'int' to 'char' changes value from '12080' to ''0'' [-Woverflow]
37 | char L = '/0';//左括号
| ^~~~
foo.cc:38:34: warning: overflow in conversion from 'int' to 'char' changes value from '12080' to ''0'' [-Woverflow]
38 | char R = '/0';//右括号
| ^~~~
foo.cc:61:46: warning: unused variable 't' [-Wunused-variable]
61 | char t = pop();//出栈
| ^
foo.cc:80:33: warning: unused variable 'a' [-Wunused-variable]
80 | if (int a = empty() == true)
| ^
[Hydro](https://hydro.ac)提供评测服务