Well, you are telling the compiler that you are returning a pointer to an array of 10 elements, so:
Btw, you cannot initialize the array with a variable "i". This is not allowed in ISO C++.
typedef int arrT;
arrT* func(int i);
arrT* func(int i)
static int arr;
If you need to do so, you should use a vector:
But why are you trying to return an array in this manner?
typedef vector<int> arrT;
arrT& func(int i);
arrT& func(int i)
static std::vector<int> arr(i);