valid code

J

Jens Thoms Toerring

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,217
Latest member
topweb3twitterchannels

Latest Threads

Top