/ fz_zsl /

记录详情

Compile Error

/in/foo.cc: In function 'int rank(Node*, int)':
/in/foo.cc:101:29: error: reference to 'rank' is ambiguous
  if ( cur->val>val ) return rank(cur->c[0],val);
                             ^~~~
/in/foo.cc:95:12: note: candidates are: int rank(Node*, int)
 inline int rank ( Node* cur , int val ) 
            ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/stl_pair.h:59,
                 from /usr/include/c++/6/utility:70,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:102:25: error: reference to 'rank' is ambiguous
  else return s+cur->cnt+rank(cur->c[1],val);
                         ^~~~
/in/foo.cc:95:12: note: candidates are: int rank(Node*, int)
 inline int rank ( Node* cur , int val ) 
            ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/stl_pair.h:59,
                 from /usr/include/c++/6/utility:70,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:1:
/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:148:30: error: reference to 'rank' is ambiguous
   if ( op==3 ) printf("%d\n",rank(root,x));
                              ^~~~
/in/foo.cc:95:12: note: candidates are: int rank(Node*, int)
 inline int rank ( Node* cur , int val ) 
            ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/stl_pair.h:59,
                 from /usr/include/c++/6/utility:70,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~

信息

递交者
类型
递交
题目
图书管理系统
语言
C++
递交时间
2018-04-01 08:09:01
评测时间
2018-04-01 08:09:01
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes