Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Function Pointers (http://www.go4expert.com/forums/function-pointers-t6134/)

buddy 31Aug2007 19:15

Function Pointers
Can any one tell me,in what kind of situation a function pointer can be used.

Please give an example.


shabbir 31Aug2007 22:20

Re: Function Pointers
Anywhere when you need to call different functions depending on some condition. Specially Some call back.

Say When I call a function to fetch some data from a remote server.
Now if its a synchronous call my caller can hang.
So now the function which does the job takes some function pointer which is called when the job is done.

All times are GMT +5.5. The time now is 07:17.