473,396 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

unable to understand this typedef

What does this typedef represent?
typedef void Sigfunc(int);

-Sanchit
Mar 20 '08 #1
1 1584
Sanchit wrote:
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;
Mar 20 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Nancy | last post by:
Hi, When I start my PC(winXP Pro), it always says: Unknown(): Unable toload dynamic library './php_msql.dll' - The specified module could not be found. Then my Apache servre starts, load php...
3
by: shan_rish | last post by:
Hi Group, I am not able to understand the following code fragement (a return statement of a function). bsearch is a binary search function and the (CompareFunction)RnDtsComparitor) parameter is...
5
by: Maett | last post by:
Hi. When I try to compile this piece of Code with VC.NET 2003 // code start #include <vector> template< class T > struct Marker { public:
51
by: Richard Hengeveld | last post by:
Hi all, I'm trying to understand how pointers for function parameters work. As I understand it, if you got a function like: void f(int *i) { *i = 0; }
4
by: Abi | last post by:
We able to generate this error in our test environment and were able to research this enough to understand that the issue is NOT with an abject that needs to be serialized but rather as the stack...
9
by: Jim in Arizona | last post by:
I get this error: Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlInputText' to type 'System.Web.UI.WebControls.TextBox'. Using this code: Dim test3 As TextBox test3 =...
2
by: srikar | last post by:
Hi I am having a problem using typedef what does these declaration mean? typedef gtb(string_t, tt_type_enum) tt_type_table( &stringless, &stringequals ); typedef gtb(string_t,tt_qual_enum)...
0
by: mattng604 | last post by:
Hi, I am trying to typecast a void* pointer to a structure I defined called _sfrdm336_mdb. However, when I try, I get the following error: Oops in fault.c, Unable to handle kernel paging...
8
by: pereges | last post by:
Hi, I'm trying to deallocate a kd tree which I created dynamically. There were no problems creating the structure and I can access it easily but there is a problem while trying to free it. Here's...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.