记录详情

Compile Error

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)提供评测服务

信息

递交者
类型
递交
比赛
(中澳班)数据结构之“线性表”
语言
C++
递交时间
2022-10-03 17:31:04
评测时间
2022-10-03 17:31:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes