need to parse csv

How do I parse .csv file using MFC/C++
netformxAsked:
Who is Participating?
 
pallospCommented:
What about this?
http://www.mayukhbose.com/freebies/c-code.php##csv

The author says his code is compatible with both Linux and Visual C++ in Windows.
0
 
pallospCommented:
Another parser found at codeproject.com:
http://www.codeproject.com/string/splitstring.asp
0
 
contactkarthiCommented:
piece of code to get the csv data in the form of an array
http://www.codeguru.com/cpp/cpp/algorithms/strings/article.php/c8153/
0
 
TelavianCommented:
Parsing CSV data is nothing more than breaking it up into pieces. A solution using STL is given at
http://www.codeproject.com/vcpp/stl/tokenizer.asp

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.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.