Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function definition with multiple '( )'

Status
Not open for further replies.

abcd12344445555

Programmer
May 10, 2009
24
BR
Hi,

Is that a function definition? Why there are 2 sets of '()' in the definition and in the call?
What's the name of this kind of definition?

Definition:

Code:
static inline void func(pu) ( void )
{
  printf( "%s", s_msg_usage );
}

Call:

Code:
func(pu)();

Thanks.
 
func(pu) returns a function pointer. The second set of () is for the function pointer.
 
Thanks for the reply. It turned out that the 'func(pu)' was actually a macro.

Regards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top