template<typename T>
void func(T* arr, size_t length)
{
size_t size_half = length / 2;
T* left = arr, right = arr + size_half; // Cannot initialize a variable of type 'int' with an rvalue of type 'int *'
}
It seems to me like the compiler thinks right is of type int instead of int*, why?