I tried this:
int ([]foo)();
int[] foo();
int (foo[])();
But it didn't declare what I expected. Is it possible?
I don't mean declaring a function returning a pointer. I need to return exactly an array.
I tried this:
int ([]foo)();
int[] foo();
int (foo[])();
But it didn't declare what I expected. Is it possible?
I don't mean declaring a function returning a pointer. I need to return exactly an array.
What you want to return from your function is actually a pointer to the first element in the array:
int* arr(int arr[]);
for more information look at this function.