Here is a rundown on what I want to do. There is an input file, in which the contents are going to be placed into an array. The array is then going to be sorted, by being passed into a sort function. Then the sorted array should be placed into an output file. However the output file needs to have an added suffix pertaining to the sort function that is used.
input file: data
output file should be : data.somestring
Basically my question is, should i pass the input filename (string) to the function and create the output file through the function? Or do it through the main()?? One problem I might run into concerns having several sorts run on the array. If i have to run two different sorts I dont want the array from one sort to be mixed up with another if passing it back to main().
Hope I wasnt too confusing. Thanks.