No I didn't. I get an error now though. I was pretty sure you could have an array as return type, not sure where I that from.
But in any case int[] can be changed to int* and that will compile.
Edit:
Code:
typedef int array[5];
array function (array v)
{
return v;
}
int main ()
{
array v;
function(v);
return 0;
}
Typedefing it gives more descriptive errors.
Code:
Error E2091 test.c 4: Functions cannot return arrays or functions
Error E2110 test.c 5: Incompatible type conversion in function function
Warning W8057 test.c 6: Parameter 'v' is never used in function function
It does kind of make sense, since in the return statement v gets transformed into an int pointer so you'd have no choice but to use int*, which I always use anyways. (°3°)