C, C++ Pointers: Function Pointers, Callbacks, Functors

 

Following topics are very well covered in the embedded pdf, I do not need to explicitly explain any more than that:

  • Replacing switch statement with function pointers
  • Syntax for C, C++ function pointers
  • Calling Conventions
  • Assigning Address to function pointers
  • Comparing function pointers
  • Calling a function using function pointers
  • Pass function pointer as an Argument
  • Return a function pointer
    • Use typedef, it’s better, clean & easier way to read the code
  • Array of function pointer
  • Callback functions
    • Qsort example

Read full original Blog:

This browser does not support PDFs. Please download the PDF to view it: Download PDF.

</embed>
Reference