Not making sense to me. Ok, I have defined an alias to in as:
I understand arrT to be an alias for an int[10]; Arrays convert to pointers to the first element. Thus, if I define a function as such:Code:typedef int arrT[10];
This is wrong as I can't return a pointer to int because it is expecting an int (*)[] to be returned. What am I not getting here?Code:arrT *func(int i); arrT *func(int i){ static int arr[i]; int *parr = arr; return parr; }



1Likes
LinkBack URL
About LinkBacks



