I'm presuming the data is in a .txt file or some similar file, at which point you'd want to use fstreams. I'm a little confused about how they are separated into columns, but you could relatively easily read the whole file into memory and parse the text as necessary (especially if there is a certain character such as a tab separating them into columns).
If i am misunderstanding, please explain a little more clearly.
What I mean by colums is that the txt file needs to be broken up in 3 different arrays broken up by white spaces
I have to use for loops I just don't know how to use them with 2 dimensonal arrays and multilpe fscanfs
char divers [MAX_DIVERS][LEN]; //char array for names
double difficulty [MAX_DIVERS]; //array for difficulty
double scores [MAX_DIVERS][JUDGES]; // 2dim array for scores
You can't use streams eh? Other than the obvious "why?" I'm then at a loss. I don't know of anyway to even open a file without using a stream. Hmm... honestly I don't know how i'd do any of what you're saying with those methods.
If it means anything, I'd use fstreams to open the file, run a while loop to get the whole file into memory, and parse the data either through stringstreams or a series of string.find/rfind statements, convert the necessary strings into ints, and feed them into the array with a for loop in a similar fashion you showed above.
Sorry I couldn't help more... Hoping someone more qualified comes to help!
It is because I am in an intermediate C class I don't even know what a stream is. We are learning 2 dim arrays and fscanf to put different parts of file into different arrays with different dimensions.
I just don't know how to write it with the nested forloops or while statements.
well for some reading on the subject
in out stream
http://www.cplusplus.com/reference/iostream/iostream/
file streams
http://www.cplusplus.com/reference/iostream/fstream/
string streams
http://www.cplusplus.com/reference/iostream/stringstream/
they're pretty useful for console apps, though I'd be willing to bet any API or GUI would replace their use.