记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:15:9: error: reference to 'stack' is ambiguous
         stack[++top]=cur++;
         ^~~~~
/in/foo.cc:4:5: note: candidates are: int stack [1010]
 int stack[N],a[N]; 
     ^~~~~
In file included from /usr/include/c++/6/stack:61:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:89,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_stack.h:99:11: note:                 template<class _Tp, class _Sequence> class std::stack
     class stack
           ^~~~~
/in/foo.cc:16:7: error: reference to 'stack' is ambiguous
    if(stack[top]==a[i])
       ^~~~~
/in/foo.cc:4:5: note: candidates are: int stack [1010]
 int stack[N],a[N]; 
     ^~~~~
In file included from /usr/include/c++/6/stack:61:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:89,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_stack.h:99:11: note:                 template<class _Tp, class _Sequence> class std::stack
     class stack
           ^~~~~

信息

递交者
类型
递交
题目
车厢调度(train)
题目数据
下载
语言
C++
递交时间
2019-07-07 16:37:22
评测时间
2019-07-07 16:37:22
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes