need to parse csv

Posted on 2007-08-05
Last Modified: 2013-11-05
How do I parse .csv file using MFC/C++
Question by:netformx
    LVL 9

    Accepted Solution

    What about this?

    The author says his code is compatible with both Linux and Visual C++ in Windows.
    LVL 9

    Expert Comment

    Another parser found at
    LVL 17

    Assisted Solution

    piece of code to get the csv data in the form of an array

    Assisted Solution

    Parsing CSV data is nothing more than breaking it up into pieces. A solution using STL is given at

    All you want to do it split or tokenize the string on the delimeter character. Once these pieces are produced then scan through each piece to identify which pieces should be combined because they had the delimeter inside a quoted section. To identify this scan through each piece and see if it has a quote character. If it does then scan until you find the piece that ends the quote and combine the pieces.
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    One of Google's most recent algorithm changes affecting local searches is entitled "The Pigeon Update." This update has dramatically enhanced search inquires for the keyword "Yelp." Google searches with the word "Yelp" included will now yield Yelp a…
    Prime numbers are natural numbers greater than 1 that have only two divisors (the number itself and 1). By “divisible” we mean dividend % divisor = 0 (% indicates MODULAR. It gives the reminder of a division operation). We’ll follow multiple approac…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now