i keep having a problem with my arrays.
when i set them up and try to re-use them elsewhere i only get the last part of the array and all the rest are pointers.
typedef int* ptr;
ptr sub;//dynamic
int count = end - start; //the sub-array's size is not "end", but "end - start".
if (count <= 0) //check that you actually have a sub-array to create.
return 0; //here, your function has no return type?
sub = new int[count];
for(int i=start; i<end; i++)
{
int j = 0;
sub[j] = Array[i];
cout<<sub[j]<<", ";
j++;
}
for(int l=0; l<count; l++)
{
cout<<sub[l] << ", ";
}
delete sub;
can someone help me with this please.