-
C file search
I have a file with 13 columns of data and 10000 rows. The first column is identical for each row. The second row is the date. I need to read this file and extract the data for a specific date into a separate file. Each date has approximately 500 records.
What is the best way of doing this? What method should I use to search the first occurrence of the date and then read all the records for that date into a different file?
Any suggestions please...
Thanks
-
So read in a row, parsing it into columns (if it's nicely formatted, fscanf will work for you). If the second column is the date you want, write it out. If not, don't.