cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Sort program
Sort program
Sep 26, 2012 at 8:06pm UTC
Rgriffin
(10)
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.