Possible Duplicate:
C pointer to array/array of pointers disambiguation
In C, is int *thing[5]
an array of five pointers, each pointing to an integer, or a pointer to an array of five integers?
[]
trumps *
per the C precedence table which means you have an array of five int pointers.
If in doubt use parenthesis - the maintenance programmers will thank you (as will you at 5am when you finally find the bug!)
Maybe is a duplicate... It is an array of five pointers to integer; the program cdecl
cited in a similar question can be useful for newbie:
cdecl> explain int *t[5];
declare t as array 5 of pointer to int
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With