|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
is this valid int (*f)(int (*[*])[]) c?
|
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
stumpedatwork@gmail.com wrote:
> is this valid int (*f)(int (*[*])[]) c? Not as it is;-) First a question: is the 'c' at the end a typo or is it supposed to be part of that? If not a de- finintion of a variable 'f' as int (*f)(int (*[])[]); is valid. It defines 'f' to be a pointer to a function re- turning int and taking as its only argument an array of pointers to arrays of int. If you have a closer look you will notice that I removed one '*' from your mix, the one between '[' and ']' in the argument. As far as I understand the C99 language it stands for a variable length array. If that is correct putting back in the '*' should be ok if you have a C99 compliant compiler since it would just change the mea- ning of the argument part from "an array of pointers to arrays of int" to "a variable length array of pointers to arrays of int". Regards, Jens -- \ Jens Thoms Toerring ___ jt@toerring.de \__________________________ http://toerring.de |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Thank you Jens. It was a typo. :-)
It was the c99 vla thart puzzled me. |
|
![]() |
| Outils de la discussion | |
|
|