What's the utility of a pointer to function in C? -


possible duplicate:
what point of function pointers?

i read pointers function in k+r. understand how these pointers work, don't see utility they. what's use type of pointers in programming?

you can use function pointers variety of tasks such registering factories, applying algorithm on data structure (e.g. sorting list using user-defined sort function). there few other uses need them inversion of control: let else call code, , providing pointer function.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -