News for hackers. Stuff that matters.
Re:Basics Of Function Pointers In C by greenyoda on Thursday August 01, 2013 @12:17AM (#6138605)
The article is missing at least one useful thing: how to declare a typedef for a function pointer. This can be used both to avoid error-prone duplication of declarations and to simplify excessively complex declarations.

Here's a simple example:

http://en.wikipedia.org/wiki/Typedef#Using_typedef_with_func...

Here's a more complex example:

http://www.devx.com/tips/Tip/13829

Here's a tutorial on how to interpret the complex declarations like the one at the top of the previous example:

http://www.codeproject.com/Articles/7042/How-to-interpret-co...

Here's a discussion about using typedefs for function pointers on StackOverflow:

http://stackoverflow.com/questions/1591361/understanding-typ...

See also: The Linux command "cdecl":

http://linux.die.net/man/1/cdecl

Plus, there's an on-line version:

http://www.lemoda.net/c/cdecl

Re:Basics Of Function Pointers In C by buttproblem on Thursday August 01, 2013 @12:54AM (#6138749)
The most useful education I got on reading function pointers is the spiral rule:

http://c-faq.com/decl/spiral.anderson.html

(I accidentally deleted my reply)

Re:Basics Of Function Pointers In C by conradev on Thursday August 01, 2013 @01:03AM (#6138776)
It's also good to note that these links for further reading are applicable for blocks in Objective-C, which use the same syntax for declaration, only replacing the asterisk '*' with a caret '^'.
Re:Basics Of Function Pointers In C by yuvadam on Thursday August 01, 2013 @03:37AM (#6139116)
There's another interesting discussion here:

http://stackoverflow.com/questions/840501/how-do-function-po...