Chapter 12. Tricks with Functions

pointers to functions

12.1. What are Virtual Functions?

Another use of the void data type is for making pointers to functions. This is a fairly advanced programming technique but a very useful one once you become comfortable with it.

Here is an example of a function pointer:

Example 12-1. virtual_function.c

  /* oh, crap, better go write one... */

  return 0;