Why are we used function pointer?What is actual benefit of of pointer to function in case of storage classes....
Printable View
Why are we used function pointer?What is actual benefit of of pointer to function in case of storage classes....
I have a feeling the question you ask is your homework :)
Anyway, Callbacks is one good reason -- Just look at the Gtk+ source for 100 zillion examples.
Not to long ago I was reviewing such code and the below link may suit you as well.
http://www.cplusplus.com/doc/tutorial/pointers.html