4/17/08

Invoking a Function Through a fuction Pointer

When you call a function through a pointer to function, use that pointer as if it were the function itself, not a pointer. For example:
#include
char buff[10];
void (*pf) (char *, const char *);
pf = strcpy; // take address of strcpy
pf(buff, "hi"); // use pf as if it were the function itself

No comments:

ITUCU