This is my code:
map<string, int> errs; struct Compare { bool operator() (map<string, int>::const_iterator l, map<string, int>::const_iterator r) { return ((*l).second < (*r).second); } } comp; sort(errs.begin(), errs.end(), comp);
Unable to compile. This is what I get:
no matching function for call to 'sort(..'
Why is that? Can anyone help? Thanks!
source share