1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How read from .csv file?

Discussion in 'C' started by Yumin, Jan 21, 2012.

  1. Yumin

    Yumin New Member

    Jan 21, 2012
    Likes Received:
    Trophy Points:
    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?

Share This Page