hi, i've writen a function to get a sub array from another array
subarray(int* Array, int start,int end)
{
typedef int* ptr;
ptr sub;
sub = new int[end];
for(int i=start; i<end; i++)
{
int j = 0;
Array[i]=sub[j];
j++;
}
for(int l=0; l<end; l++)//added as an after thought
cout<<sub[l] << ", ";
}
at the moment it's only showing the memory addresses rather than the variables and i can't figure out how to fix this.
any help would be greatly appreciated