|
-
Oct 3rd, 2002, 06:46 AM
#1
Thread Starter
PowerPoster
C: Function Pointer??
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?
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|