Skipping pieces of .csv file and putting into array

Hello, I am trying to put pieces of a csv file into an array, but i only want to put certain pieces of it. This is the information that i have
1
2
3
4
5
6
7
Player,Current Team, Age , Nat , Position ,From,To,Transfer fee
Gareth Bale, Real Madrid,24,Wales,RW,Tottenham,Real Madrid CF,91000000
Edinson Cavani,PSG,26,Uruguay,CF,SSC Napoli,PSG,64500000
Falcao, Monaco,27,Columbia,CF,Atlético Madrid,Monaco,60000000
Neymar, FC Barcelona,21,Brasil,LW,Santos,FC Barcelona,57100000
Mesut Özil, Arsenal,24,Germany,AM,Real Madrid ,Arsenal,50000000
James Rodríguez,Monaco, 21,Columbia,RW,FC Porto,Monaco,45000000

With this i want to skip the name and team but need age. I'm unsure of how to code this and any help would be greatly appreciated.
Assuming you know how to read comma separated values from file, you can read all the values and then not use/store them.

something like

while(not end_of_file)
{
readline
separate name, team etc and discard
separate age, nat etc and store/use
}
I am still struggling with this concept, i do not understand how to skip pieces but read other pieces.
For example, i want to get the age of each player the team they went to and the fee. I just do not understand how to get there.
you can Tokenize by using the delimiter "," and then when you read the data into variables skip the information you do not want.
Topic archived. No new replies allowed.