Return to site

C callback design pattern

broken image

The same concept applies to function pointers, except that instead of pointing to variables, they point to functions. C++ takes a slightly different route for callbacks, which is another journey altogether.Ī pointer is a special kind of variable that holds the address of another variable. This article demonstrates the basics of function pointers, and how to use them to implement function callbacks in C. Function pointers are among the most powerful tools in C, but are a bit of a pain during the initial stages of learning.

broken image