I believe it is invalid syntax. Did you mean a declaration for an array of pointers returning int and taking no parameters?
#include <iostream>
int foo() { std::cout << "foo\n"; return 0; }
int bar() { std::cout << "bar\n"; return 0; }
int main()
{
int (*p[])() = {foo,bar};
p[0]();
p[1]();
return 0;
}
/* my output
foo
bar
*/
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
Sukhbir:
Can you please stop naming your threads "Ambiguous part #", and start naming them with a title that indicates what you're asking?
One of the keys to getting responses to your posts is to post a relevant topic to your question. "Ambiguous part #" is, well, ambiguous.
alc6379
Cookie... That's it
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147