• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2243
  • Last Modified:

typedef void (*FUNC)() ????

I've been tasked with figuring out a C program. Unfortunately I am not big on C (woe me) and worst of all there are no C references books around for me to use.

If anyone can give me a brief tutorial (long explanation) as to what this line mean it would be appreciated.

typedef void (*FUNC)();

/* later used in a procedure like so */

static FUNC note_func[2];

void lcp_init(FUNC p_note_func)
  note_func[0] = p_note_func;

1 Solution
Well FUNC is the typedef for a procedure .... the procedure has no parameter and returns no value...

note_func is a array that can hold two functions and lcp_init will place a procedure in the first slot of the array!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now