|
|
Testing.cpp: In function ‘int main()’: Testing.cpp:40:46: error: no matching function for call to ‘sort(std::vector<Sales_data>::iterator, std::vector<Sales_data>::iterator, <unresolved overloaded function type>)’ sort(items.begin(), items.end(), compareIsbn); ^ Testing.cpp:40:46: note: candidates are: In file included from /usr/include/c++/4.8/algorithm:62:0, from Testing.cpp:12: /usr/include/c++/4.8/bits/stl_algo.h:5474:5: note: template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare) sort(_RandomAccessIterator __first, _RandomAccessIterator __last, ^ /usr/include/c++/4.8/bits/stl_algo.h:5474:5: note: template argument deduction/substitution failed: Testing.cpp:40:46: note: couldn't deduce template parameter ‘_Compare’ sort(items.begin(), items.end(), compareIsbn); ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from Testing.cpp:12: /usr/include/c++/4.8/bits/stl_algo.h:5438:5: note: template<class _RAIter> void std::sort(_RAIter, _RAIter) sort(_RandomAccessIterator __first, _RandomAccessIterator __last) ^ /usr/include/c++/4.8/bits/stl_algo.h:5438:5: note: template argument deduction/substitution failed: Testing.cpp:40:46: note: candidate expects 2 arguments, 3 provided sort(items.begin(), items.end(), compareIsbn); |