记录详情

Compile Error

/in/foo.cc: In function 'int rank(int, int)':
/in/foo.cc:131:22: error: reference to 'rank' is ambiguous
 return ord<=cnt[2*t]?rank(2*t,ord):rank(2*t+1,ord-cnt[2*t]);
                      ^~~~
/in/foo.cc:126:5: note: candidates are: int rank(int, int)
 int rank(int t,int ord)
     ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:4:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:131:36: error: reference to 'rank' is ambiguous
 return ord<=cnt[2*t]?rank(2*t,ord):rank(2*t+1,ord-cnt[2*t]);
                                    ^~~~
/in/foo.cc:126:5: note: candidates are: int rank(int, int)
 int rank(int t,int ord)
     ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:4:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:154:5: error: reference to 'rank' is ambiguous
   b=rank(1,x);
     ^~~~
/in/foo.cc:126:5: note: candidates are: int rank(int, int)
 int rank(int t,int ord)
     ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:4:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~

信息

递交者
类型
递交
题目
列队
语言
C++
递交时间
2018-01-13 14:39:01
评测时间
2018-01-13 14:39:01
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes