dpb
Posts:
9,850
Registered:
6/7/07
|
|
Re: Pull out specific numbers from unstructured text file
Posted:
Feb 9, 2013 12:36 PM
|
|
On 2/9/2013 11:12 AM, Stan wrote: > ^^^Could the above problem be because I need to open and close a file > repeatedly?...
No.
It's as I explained previously--the fscanf() only processes as much as needed to satisfy the format string. You have to get each record (including blank ones) fully to progress from one to the next.
Work thru at the command line and examine the results and it should become clear what happens (and thereby what is needed to fix it). This should be a learning experience here, too... :)
--
|
|