P
pingkai
Hi,
From the FAQ I know that "the array of N pointers to functions
returning pointers to functions returning pointers to char" is
declared as
char * (* (*a[N]) ( ) ) ( ) ;
And I can understand the declaration using Clockwise/Spiral Rule.
However I am wondering why I can not declare it like this:
char* (* ( *a[N]) ( ) ( ) ) ;
It seems from the rule, it will also give out the same definition,
however the compiler says it actually means
"a array of N pointers to function returning function returning
pointer to pointer to char" and is thus an error.
Could anybody explain this? Thanks.
From the FAQ I know that "the array of N pointers to functions
returning pointers to functions returning pointers to char" is
declared as
char * (* (*a[N]) ( ) ) ( ) ;
And I can understand the declaration using Clockwise/Spiral Rule.
However I am wondering why I can not declare it like this:
char* (* ( *a[N]) ( ) ( ) ) ;
It seems from the rule, it will also give out the same definition,
however the compiler says it actually means
"a array of N pointers to function returning function returning
pointer to pointer to char" and is thus an error.
Could anybody explain this? Thanks.