question about Function pointers

Hello forum memebers

As iam new to C++ programming i am little bit confuse to understand the function pointers.
Please help me to understand the function pointers with examples are suggest me good site for this,Its better if it have picturial representation ie any PPTS available in Google.

I am looking forward from you ASAP.

Thanks & Regards
Rajkumar.g

have a look here The Function Pointer Tutorials - Index

The syntax to use a function pointer is a little tricky, but the concept isn't hard at all if you know what a pointer is. It's just a pointer, that points to a function, because functions reside in memory too.

When you call a function name in C, what you're actually doing is calling an address in memory where the function's code resides. Most of the linker's job is to figure out where everything should go and substitute appropriate addresses for names. So, whenever you call a function, it actually ends up as a hardcoded address...

It's also possible to call an arbitrary address; for instance, if you loaded a dynamic library, you have to use function pointers to call functions from it since you won't know what they will be until the library's loaded. It works the same as far as the code's concerned. It just uses a pointer value you give it, instead of hardcoding one.

1 Like