How should I pass a function inside an struct as a functor? I assumed this should work fine, but it didn't:
#include <algorithm>
using namespace std;
struct s {
int a[10];
bool cmp(int i, int j) {
// return something
}
void init() {
sort(a, a + 10, cmp);
}
};
which gets <unresolved overloaded function type>