Here is a part of my code
int river(int a[], int n){
int sorted[] = a;
}
n being the size of the array
I have tried a couple of different ways, including
sorted[n]
but I get problems each time. What I am trying to do is duplicate the array with a changed variable name. The array will be exactly the same, just stored in a different variable (because I want to obtain information but not modify the original array).
Is this just not possible because of something to do with dynamically changing the size of the array, or am I just missing the point?
Thanks!
memcpyis for. " I want to obtain information but not modify the original array" -- wait ... then why do you want to copy it? Just use the original array.