Hi,
I have a the following declarations in my C code:
This address in 'p' is, as stated above, the address of the function func1().PHP Code:void func1(void); // Prototype of function func1()
long *p = ... // pointer to long which contains a valid address.
// The address is that of the function func1()
void (*fptr)(void); // This is the function pointer
How do I assign from pointer 'p' to pointer 'fptr' so that the
function executes if called as given below:
Thanks in advance.PHP Code:fptr();




Reply With Quote