Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   How read from .csv file? (http://www.go4expert.com/forums/read-csv-file-t27642/)

Yumin 21Jan2012 23:04

How read from .csv file?
 
Hello all:
I am accustomed to read/write txt/ASCII file with ifstream/ofstream.

Supposed now the file is aaa.csv, the data are:

01/10/12 100.01
01/11/12 101.02
01/12/12 102.03
01/13/12 105.03
01/14/12 107.07

I need to read them into my program variables. the 1st column into "string date[5];" and the 2nd column into "float price[5];"

What is the way/codes for me to achieve that?


All times are GMT +5.5. The time now is 21:23.