I am building a class Boggle in C++. In the Boggle class, I have declared a structure type called boardIndex:
struct Boggle::boardIndex {
int row, col;
};
And a callback function to compare two "boardIndex"s:
int Boggle::CmpByIndex(boardIndex a, boardIndex b)
I want to pass the callback function to a Set of boardIndex elements within the Boggle.cpp file:
Set<boardIndex> usedIndices(CmpByIndex);
Is this possible? In the current form, I'll get an error that a "reference to non-static member function must be called." I don't have any objects of the Boggle class - is there another way of calling the CmpByIndex function here?