unable to understand this typedef
What does this typedef represent?
typedef void Sigfunc(int);
Re: unable to understand this typedef
> What does this typedef represent?
> typedef void Sigfunc(int);
It declares Sigfunc as an alias for "function of one
int argument returning no value."
You can't actually use Sigfunc to define a function:
Sigfunc func ... er, where's my parameter list?
... er, how do I refer to the parameters?
... er, what do I return? it looks like I
should return a function, but ...?
However, you *can* use it to declare a function:
Sigfunc sig1; /* sig1 is a function ... */
Sigfunc sig2; /* sig2 is a function ... */
And you can use it to describe a function pointer:
Sigfunc *fptr = sig1;
|All times are GMT. The time now is 07:15 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.