473,769 Members | 7,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What does "void (*vector[])( )" means?

Is this a pointer array of function?If I was wrong,what does it
means?

Nov 14 '05 #1
7 1892
"Bruce Sam" <pe*********@ya hoo.com.cn> writes:
Is this a pointer array of function?If I was wrong,what does it
means?


array of pointer to function returning void
--
"IMO, Perl is an excellent language to break your teeth on"
--Micah Cowan
Nov 14 '05 #2
Bruce Sam wrote:
Is this a pointer array of function?If I was wrong,what does it
means?


void (*vector[])( )

can be simplied (in terms of readability) as

typedef void (*PF) ();
PF vector[];
Nov 14 '05 #3
Quoth Ben Pfaff on or about 2004-11-12:
Is this a pointer array of function?If I was wrong,what does it
means?


array of pointer to function returning void


If you also mention cdecl(1), the OP might answer the next question
himself.

From the manpage:

Cdecl (and c++decl) is a program for encoding and decoding C (or
C++) type declarations.

-trent
Nov 14 '05 #4
Bruce Sam wrote:
Is this a pointer array of function?If I was wrong,what does it
means?


Don't forget to put important parts of your message in the message. It
is not sufficient to hide that information in a header.
"void (*vector[])( )" declares vector as an array of pointers to
functions with an unspecified argument list and returning nothing.
Nov 14 '05 #5
"Bruce Sam" <pe*********@ya hoo.com.cn> wrote in message news:<11******* *************** @f14g2000cwb.go oglegroups.com> ...
Is this a pointer array of function?If I was wrong,what does it
means?


This is an array of functions each with no (undefined) argument list
that return void. It can be made easier to understand ysing a typdef
for the function
Nov 14 '05 #6
On Sun, 14 Nov 2004 08:22:37 -0800, Stuart Gerchick wrote:
"Bruce Sam" <pe*********@ya hoo.com.cn> wrote in message
news:<11******* *************** @f14g2000cwb.go oglegroups.com> ...
Is this a pointer array of function?If I was wrong,what does it means?
This is an array of functions each with no (undefined) argument list


That should be "array of pointers to functions", you cannot have an "array
of functions" in C.
that return void. It can be made easier to understand ysing a typdef
for the function


Rob Gamble
Nov 14 '05 #7
On 14 Nov 2004 08:22:37 -0800, sg*******@bloom berg.net (Stuart
Gerchick) wrote:
"Bruce Sam" <pe*********@ya hoo.com.cn> wrote in message news:<11******* *************** @f14g2000cwb.go oglegroups.com> ...
Is this a pointer array of function?If I was wrong,what does it
means?


This is an array of functions each with no (undefined) argument list
that return void. It can be made easier to understand ysing a typdef
for the function


Almost. It is an array of *pointer to* function. The parameter list
of the function is *unspecified*, which does not necessarily mean the
function takes no arguments.
<<Remove the del for email>>
Nov 14 '05 #8

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

Similar topics

2
2491
by: Bill Zhao | last post by:
Dear all, Sorry for i did not paste original propreity codes See below the fake codes for what I cannot understand. =============================================== lass A { public: virtual int xfunc() = 0 ;
7
2575
by: Ollej Reemt | last post by:
Hello, I would like to know if there is a difference in c++ between the following two method-declarations: void Method(); and void Method(void);
4
3751
by: Luke Wu | last post by:
I am just wondering what the following terms usually mean: 1) "Standard C" 2) "K&R C" 3) "ANSI C" I am pretty sure "ANSI C" usually refers to the C89 standard, but what
188
17428
by: infobahn | last post by:
printf("%p\n", (void *)0); /* UB, or not? Please explain your answer. */
9
1236
by: A.M | last post by:
Hi, I am analysing a VB.NET code and i see this line of code: Dim strCacheKey As String = & "provider" What is the role of ?
5
4416
by: Niu Xiao | last post by:
I saw a lot of codes like: void foo(void* arg) void bar(void** arg) f((void*)p) but what does void pointer mean in c? I just know it stands for generic pointer. thanks.
6
17187
by: tingjun.li | last post by:
There is a demo program: ------------------------------------------------- const char* WS = " \t\n"; const int n_WS = strlen(WS); char* s1 = "This sentence contains five words."; char* s2 = "OneWord"; char* end1 = find_first_of(s1, s1 + strlen(s1), WS, WS + n_WS);
4
3230
by: giannis | last post by:
I am a newbie at VB. When i try to remove an item from the BindingSource and try to delete this item from the database: BindingSource.RemoveCurrent() Me.TABLETableAdapter.Update(Me.DataSet.TABLE) i receive the message :
4
5374
by: Lightmage | last post by:
Hello all, I am using C++ to convert a certain file into an XML file. During the conversion the program does some arithmetic operations on the information that is then outputted in xml format. The information is a double variable. Usually the output is exactly what it should be, but every so often the output is "-1.#J".
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.