Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1999-07-05
1
Medium Priority
?
2,220 Views
Last Modified: 2008-02-20
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;
}

Thanks!
0
Comment
Question by:totsubo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
hougaard earned 20 total points
ID: 1263301
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!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question