function pointer
Hello All,
What is the difference between the two?
int (&pFunc)(int, int); -- 1
and
int(*pFunc)(int, int);-- 2
Why would someone write code as in 1 above?
Thanks in advance.
[225 byte] By [
Jacko123] at [2007-11-20 11:40:47]

# 1 Re: function pointer
Hi,
In first case there is function ref. and it can be used when you want to initialise it once...
e.g
suppose you want to get function address from dll and initialise it to your function ref. for further use and there is no need to change the pFunc's value i.e function address. in further scope.
in second case you can asssign any function address with same diff. any time.
-Anant