News

In the true spirit of pointers, our first use case example is the reference to a previous article handling the implementation of a state machine with function pointers.
One of the most common applications for using function pointers is in task schedulers. Every embedded system contains some type of task scheduler whether it is a simple round robin loop or a state of ...
This may fall under the heading of "Don't do that" but did cause me to be slightly curious.What would happen if you say, created a pointer to a function that took three ints as arguments, but then ...
Here, the average_apply function does all the averaging work, but it requires a function pointer, fn, to do the math operation you want. There are two functions to work out the math: ...
fib = fib.Memoize(); The first line of this example creates the variable to hold the function pointer and indicates that it should have one parameter of type integer and return an integer.