Thread: CSV reader!
View Single Post
 
Old 05-12-2006, 11:27 PM
gtd141 gtd141 is offline
Junior Member
 
Join Date: Jan 2006
Posts: 11
gtd141 is on a distinguished road
Hello codersguru & firedave,

I'm working on a program that writes a .csv file that has 1 to multiple records which can be executed with a script or expert. To make this work, I have to read each field of each record into an array like:

ordersArray[record][field];

I think it would be very cool to have a function in the .csv reader to read a .csv file into an array. Something like:

int gGetRecordsArray(string file_path,int delimiter)

Example:
int ordersArray[][] = gGetRecordsArray("C:\\demo.CSV",','));

This would end up as ordersArray[record][field].

Is this possible codersguru? In any case, I'll post the final code here for firedave.

Thank you,
Greg