Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:13:11: error: reference to 'count' is ambiguous
     while(count!=n)
           ^~~~~
/in/foo.cc:3:13: note: candidates are: long long int count
 long long n,count=0,i=0,t;
             ^~~~~
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algo.h:3961: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)
     ^~~~~
/in/foo.cc:19:13: error: reference to 'count' is ambiguous
             count++;
             ^~~~~
/in/foo.cc:3:13: note: candidates are: long long int count
 long long n,count=0,i=0,t;
             ^~~~~
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algo.h:3961: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)
     ^~~~~
/in/foo.cc:23:8: error: reference to 'count' is ambiguous
     if(count==n)
        ^~~~~
/in/foo.cc:3:13: note: candidates are: long long int count
 long long n,count=0,i=0,t;
             ^~~~~
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algo.h:3961: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)
     ^~~~~

信息

递交者
类型
递交
题目
P1009 阶乘末尾的0
语言
C++
递交时间
2024-07-31 16:07:52
评测时间
2024-07-31 16:07:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes