I would like to keep an array the same even after it is passed into a function. I am doing different sorts on the same data but when i try using
where n is the total number in the array and num is an array.Code:num=temp HeapSort(temp,n);
When I try using this, num and temp is sorted completed. Not sure why. Is there anyway to keep num the same after a function is used on it. I am not using any pointers by the way.