int *(*table())[30];
I cannot find a solution anywhere. What is the *table(), can it be a function or array?
Can you please tell me what that means?
You can decode this from the inside out:
int *(*table())[30];
The innermost binding istable()
, which is a function with unspecified arguments. The next level is *table()
, so table
is returning a pointer to something. The next level is (*table())[30]
, so it's returning a pointer to a 30-length array of something. The next level is *(table())[30]
, so it's returning a pointer to a 30-length array of pointers to something. The final level adds the type specifier, int *(*table())[30]
.
So table
is a function (with unspecified arguments) that returns a pointer to a 30-length array of pointers 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