Currently I am working on a merge sort project in my class and am stuck on how to access and utilize the last parameter of this function header:
void Mergesort(ItemType* item, size_t nelem, int **(*fcmp) (const ItemType& e1, const ItemType& e2))**
Knowing that the result of the comparison will be -1, 0, or 1 but since the parameter itself doesn’t have a name, I don’t know how to explicitly call the pointer of the function.
Thanks in advance for any help.
It’s a pointer to a function, so you can call it like a regular function. For example: