foo.cc: In function 'int main()':
foo.cc:15:15: error: reference to 'count' is ambiguous
for(i=100;count<m;i--)
^~~~~
foo.cc:4:15: note: candidates are: int count
int n,m,ss,kk,count=0,i,max=0,x,j;
^~~~~
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algo.h:4076:5: note: template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
^~~~~
foo.cc:16:9: error: reference to 'count' is ambiguous
count+=s[i];
^~~~~
foo.cc:4:15: note: candidates are: int count
int n,m,ss,kk,count=0,i,max=0,x,j;
^~~~~
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algo.h:4076:5: note: template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
^~~~~
foo.cc:17:26: error: reference to 'count' is ambiguous
printf("%d %d\n",i+1,count);//输出
^~~~~
foo.cc:4:15: note: candidates are: int count
int n,m,ss,kk,count=0,i,max=0,x,j;
^~~~~
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algo.h:4076:5: note: template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
^~~~~
[Hydro](https://hydro.ac)提供评测服务