Hi everyone. I wasn't sure whether to put this question on the I/O board or not, it really isn't about I/O specifically...
I have a text file that I have to read information from, and then manipulate and sort the data. I am trying to determine what would be the most efficient way to handle this.
Firstly, I need to figure out what kind of data structure I should store my data in so I can manipulate it. The lines of information are formatted in "columns" like this:
"Account Number","Name","Company","Street","City","State","Zip","Email","Birth Date","Favorites","Standard Payment","Latest Payment","Balance" and I intend to seperate them by "column". I know how many columns there are, so it would be easy enough to put them in an array. My problem is that I do not know how many lines of information I have so I could not put this information in a 2-D array without first knowing the size of array to create and to do this I have to go through the file and count the number of lines. I could also create a Vector of String arrays, so that the Vector will resize itself every time I add a new String array (line of information seperated by column) with my data in it. Does anyone have an opinion on the most effiecient way to do this?
Help is always appreciated. Thank you!
[ June 12, 2007: Message edited by: Brandi Love ]