We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题来源:ID 165
vector<char> v1{'1', '.', '1'}; const char c = '1'; int countNum = std::count_if(v1.begin(), v1.end(), c); std::cout<<countNum<<std::endl;
报错信息:
/usr/include/c++/5/bits/stl_algo.h:3193:12: required from ‘typename std::iterator_traits<_Iterator>::difference_type std::__count_if(_InputIterator, _InputIterator, _Predicate) [with _InputIterator = __gnu_cxx::__normal_iterator<char*, std::vector<char> >; _Predicate = __gnu_cxx::__ops::_Iter_pred<char>; typename std::iterator_traits<_Iterator>::difference_type = long int]’ /usr/include/c++/5/bits/stl_algo.h:3990:29: required from ‘typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<char*, std::vector<char> >; _Predicate = char; typename std::iterator_traits<_Iterator>::difference_type = long int]’ count_if.cpp:14:57: required from here /usr/include/c++/5/bits/predefined_ops.h:234:30: error: expression cannot be used as a function { return bool(_M_pred(*__it)); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题来源:ID 165
报错信息:
The text was updated successfully, but these errors were encountered: