Suppose I have a function A()that takes in as one of its parameters a pointer to a function B(). If I want to pass to this function A() another function, what would be the correct syntax? Would it just be A(functionName), or would I pass parameters in the call?
void B(){}
void (*ptr)() = B;
void A(void(*f)()){}
//passing B
A(B);
//passing pointer
A(ptr);
void X(){} //new one!
//passing X this time
A(X);
int ERR(){} //new one
A(ERR); //ERROR argument must be void function!