I need a macro which simply calls the function which is passed as parameter to that macro. The function is void type with no parameter.
For example, if I have the following function:
void function(void) {
//doSomething
}
I need a macro, APPLY_FUNCTION which is called with the function parameter and simply calls that function:
APPLY_FUNCTION(function);
I've tried to define the macro like:
#define APPLY_FUNCTION(function) (function)
But it does not work, when I try to call the macro I am getting a "statement with no effect" error.
The question is how should I define that macro?