I am a beginner to C++. I'd like to use list::sort() with a custom sort method.
I read from the sort() doc, that we can pass a custom method.
I tried to do it myself as mentionned in the example code on sort() method doc.
But when I try to compile my code I am facing a problem that I don't you how to solve, though I am sure it is quite easy to solve :)
Here is the error:
Histogram.cc: In member function 'bool Histogram::_sortByStart()':
Histogram.cc:351: error: no matching function for call to 'std::list<Seq*, std::allocator<Seq*> >::sort(<unresolved overloaded function type>)'
/usr/include/c++/4.2/bits/list.tcc:271: note: candidates are: void std::list<_Tp, _Alloc>::sort() [with _Tp = Seq*, _Alloc = std::allocator<Seq*>]
/usr/include/c++/4.2/bits/list.tcc:348: note: void std::list<_Tp, _Alloc>::sort(_StrictWeakOrdering) [with _StrictWeakOrdering = bool (Histogram::*)(Seq*, Seq*), _Tp = Seq*, _Alloc = std::allocator<Seq*>]