Compiler output
prog.cpp: In function 'int main()':
prog.cpp:15:13: error: reference to 'count' is ambiguous
count++;
^
prog.cpp:4:5: note: candidates are: int count
int count=0 ;
^
In file included from /usr/include/c++/4.9/algorithm:62:0,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/stdc++.h:64,
from prog.cpp:1:
/usr/include/c++/4.9/bits/stl_algo.h:3947: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)
^
prog.cpp:18:13: error: reference to 'count' is ambiguous
cout << count;
^
prog.cpp:4:5: note: candidates are: int count
int count=0 ;
^
In file included from /usr/include/c++/4.9/algorithm:62:0,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/stdc++.h:64,
from prog.cpp:1:
/usr/include/c++/4.9/bits/stl_algo.h:3947: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)
^