manipulating CSV files in C++

I am trying to write a program that will take a CSV file in excel and output a certain number of lines. After searching several sites, I am frustrated as to how to get the program to recognize the file. I'm pretty sure on how to manipulate the code once the file is recognized, but until then I'm stuck. Any thoughts?
iirc, CSV is just "comma separated values". Take a look at a CSV file in a text editor like notepad and you should be able to figure it out.

rows are seperated by newlines, columns are seperated by commas.
Perhaps my question wasn't as specific as it needed to be. My question is primarily on working with streams. I'm trying to input a CSV file(a file with over 50,000 entries from a dataset) using the ofstream and ifstream commands and write the first five values to the screen. Here's what I want my program to accomplish
1) Have a prompt on the executable file where I enter the file name of the CSV file
2) Display the first 5 rows of data
Where I would like some advice on is the best way to retrieve the file into my code, and then subsequently what is the best way to display the information to the screen. I am confident that I can write the code that will retrieve the first 5 lines, but how can I get that displayed?
I tried a few different things with .csv files in C and C++ - See if these help you at all.

http://www.cplusplus.com/forum/general/15627/
http://www.cplusplus.com/forum/general/17359/
Topic archived. No new replies allowed.