simon wrote:
> char (*pa())[4];
> is this mean that an pa function pointer with return value like a char a[4] and it's argument is nothing ?
>
> right?
Wrong.
1. pa is not a pointer to a function, it's a function which returns a
pointer. "()" has higher precedence than "*", so "*pa()" is parsed as
"*(pa())" (function returning pointer) rather than "(*pa)()" (pointer
to function).
2. An empty parameter list "()" indicates that the function takes
unspecified arguments. A function which takes no arguments has
"(void)" as the parameter list.
--
Glynn Clements <glynn@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Assembler]
[Git]
[Kernel List]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[Yosemite Campsites]
[Yosemite News]
[GCC Help]