Data sorting in text files

Solved
Last edited on
if you want to return nothing write it like so:

void Sort(int sortarray[], int sizeofarray, int sortorder);
What does the Sort modify? The array 'sortarray'.

Assuming that the function does the right thing, at the end of the function the contents of the array are in correct order. Array references are passed to functions like references, and therefore the ontents of array productID of the caller (main) will be modified by the function call.

Return type void looks logical.
Thanks, I was having doubts so I asked here just to make sure. void does look logical. sortarray modifies productid
Topic archived. No new replies allowed.