I am trying to call the function deleteItems(int *array, int itemSize, int itemsCount, bool (*shouldDeleteItem)(const int*)) but i can't. Compiler says cannot convert parameter 4 from bool to bool(_cdecl*)(const int *). How i can call delleteItems with last parameter isOdd(p+i). Thanks
deleteItems() 4th parameter is a pointer to a function which returns a bool and takes one const int parameter, but what you are passing it is the result of a call to isBool() which returns a bool, not a pointer to a function
This deleteItems(p, sizeof(p+i), n, isOdd(p+i)); must be deleteItems(p, sizeof(p+i), n, isOdd);. That removes the compiler error. Are you aware that sizeof(p+i) is always the pointer size (in 32 bit systems = 4). But I see that you don't need it at all.
deleteItems() 4th parameter is a pointer to a function which returns a bool and takes one const int parameter, but what you are passing it is the result of a call to isBool() which returns a bool, not a pointer to a function
i don't understand, why you said that that is the call to isBool() ? i don't see any of that function declaration before. or is it on the library?