There is something missing in there.
char *
defines the return type of the function pointer.
(*)
is invalid as is; if you intend to declare a function pointer, you have to give it a name, for example
(*function_name)
Besides, there is a closing bracket which does not match its opening one.
For example:
#include <iostream>
using namespace std;
char * func1(char *s1, char *s2) {
return "In func1()\n";
}
char * func2(char *s1, char *s2) {
return "In func2()\n";
}
int main() {
char * (*myfunc)(char *, char *);
myfunc = func1;
cout << myfunc("", "");
myfunc = func2;
cout << myfunc("", "");
return 0;
}
This produces the following output:
In func1()
In func2()
Hope this helps. Kindly.