quick 2 dimensional array help

the file looks like this, the first column is the first element
the columns after are scores

1h 0.7 0.4 0.2 0.4 -0.1 -0.2 -0.3
1as 0.7 0.4 0.2 0.4 -0.1 -0.2 -0.3
1df 0.7 0.4 0.2 0.5 -0.1 -0.2 -0.3
1d 0.7 0.4 0.2 0.5 -0.1 -0.2 -0.3
1cz 0.7 0.4 0.2 0.6 -0.1 -0.2 -0.3
1v 0.7 0.4 0.2 1.1 -0.2 -0.4 -0.6
2dj 0.7 0.4 0.2 1.3 -0.2 -0.4 -0.6
2e 0.7 0.4 0.2 1.3 -0.2 -0.4 -0.6
2wo 0.7 0.6 0.3 1.8 -0.3 -0.6 -0.9
2n 0.7 0.6 0.3 1.8 -0.3 -0.6 -0.9
2pz 0.7 0.6 0.3 2.1 -0.3 -0.6 -0.9

the function that i'm trying to do looks like this, so far..

1
2
3
4
5
6
7
8
int inputData(ifstream& inFile, string name[], double scores[][7]) 
{ 
int number = 0; 

inFile>>name[number]

return number; 
} 

how would i read this into the program using inFile????
i used getline but thats not working so far
thanks in advance
What exactly are you having trouble with? Your code looks like you are starting in the right direction to me.
Topic archived. No new replies allowed.