sorting

how do i sort records by user speci ed field in ascending order, without knowing how many columns the file has? its getting the data from a file.
What separates each column? Can some fields be blank or contain the separator?
It doesn't matter how many columns a line/string has, only which column has the user field.

You will have to look at the data file and find the pattern.
@LB the columns are separated by tabs @samuelAdams there are more than two data files and each has different number of columns and the user can choose to sort by any column.
Use the Vector of Vector to store the data and pass to your sorted function, where you have to compare all the columns of inner vector for sorting
I there is input of sorted column then sort on that column only
thank you all for your help
Topic archived. No new replies allowed.