Original Post
hi.
i have the following code:
void Testfunction(int a, int b);
void Testfunction(int a, int b)
{
printf("HELLO %d %d",a,b);
}
i call this in my main loop:
AddFunctionPointer("POINTER_TO_TEST", &Testfunction);
this is the declaration for:
AddFunction(char TextString[40], void (*value)())
{
// store the pointer to the function
}
I know i havnt fully explained it all but i guess u get where i am coming from... right, this works fine if i dont have parameters (a & b) in "TestFunction".
If i have parameters in Testfunction as above then i get the compile error:
---------------------
Error : function call AddFunction({lval} const char[11], void (*)(int, int))'' does not match
''AddFunction(char *, void (*)())'' (non-static)
main.cpp AddFunction("THIS_FUNCTION", &Testfunction);
----------------------
PLEASE HELP!! thanks
Paul.