I'm having considerable trouble getting some function pointers to work. The idea is, that a function has an array of strings, it wants to pass the first element to a function, which will check it, and return the address of a function based on what that element is. The returned function should take an array of strings as a parameter.

I've got a function definition:

int (*checkBuiltInts(char s[]))(char *p[])

which I want to return the address of one of several functions defined as:

int functionToReturn(char *p[])


In the calling function, I have:

char **args
int (*builtInFunction(char *params[]))



I am trying to use

builtInFunction = checkBuiltIns(args)


but I get "invalid lvalue in assignment" error on that line...

anyone able to solve this for me?