Reading a .csv file

I have to read a .csv file that contains Frequency, amplitude and duration in each line separated by commas.
My code looks like,


string F;
// condes
// codes


The problem I am having is that it reads the last line twice and I don't know why that happens. Is there any other way I can read the .csv file accurately?
Answer with explanation would be greatly appreciated.
Start reading here

Hope this helps!
Topic archived. No new replies allowed.