Sort program

Me again and this time i'm working with 2d arrays


I'm trying to figure out how to infile data into a 2d array so I can sort it

I need to sort it by name, but also i need to keep the numbers in postion and have an extra slot for averaging.

The input data looks like so

Mark 99 80 76 90 100 45
Beth 87 88 78 99 67 154
etc etc


So would it look something like

Infile << "file.txt"

While infile << array names [i] << array numbers [i] [n] i++ based on number of names and the n going up to get the numbers and the resetting for the next name.
Topic archived. No new replies allowed.