bool greater(int i, int j)
{
if (i > j)
returntrue;
elsereturnfalse;
}
bool less(int i, int j)
{
if (i < j)
returntrue;
elsereturnfalse;
}
void heap(bool(*f)(int, int))
{
//Nothing here yet
}
void build(bool(*f)(int, int))
{
int a, b;
bool result = (*f)(a, b);
heap(result); //ERROR - argument type of "bool" is
//incompatible with parameter of type "bool(*)(int, int)"
}
int main()
{
build(greater);
build(less);
return 0;
}