Reputation: 91
I have such code:
int fun(int());
What does it exactly do? As far as I know it is equivalent to declaration of function taking pointer to function
int fun(int (*ptr)())
but I'm not sure why.
Upvotes: 0
Views: 157
Reputation: 141633
These are all the same:
int f( int() );
int f( int(*)() );
int f( int(*p)() );
int f( int p() );
int f( int(p)() );
Upvotes: 5