Does anybody know if it is possible in C++ to send the address of a function as a parameter to a function.
Example

foo( void* a[], int lenght i, int size, int compare(void* uno, void* dos));

then when i call it i wanna say something like

foo( numbers, 1000 , sizeof( numbers[0], compare);

what i wanna do is send to foo the address to where compare is so that it knows where to look at when it says compare inside function foo.


I know this all seems weird but its an assignment I have to do where I have to pass a code from c++ directly to assembly. Anyways reply for more info or if anybody has heard about something like this.