I am converting fortran code to C++ and wanted to find a right option for function-pointer.
The fortran code is: for two different cases, it passes two different kinds of function-pointers to another function. These function pointers have different interfaces. In C++, I need to specify interface of function-pointer and hence it is not straightforward. Can someone suggest, if C++ functor or something else, that would be useful? I wish I could use something like 'void (function) pointer' and then 'cast', but I really don't know. Thanks in advance.
EDIT: minimal example in fortran
Fortran
if(option1) then
call myfunc( abc_function_pointer,otherarguments)
else
call myfunc( xyz_function_pointer, otherarguments)
endif
where, these functions are (in C++)
void (*abc_function_pointer)(int, float) //in c++
void (*xyz_function_pointer)(int, int, int) //in c++