Can anyone help me with the code for scanning a line in a document.
Here is an example of the document:
Something here (Varies from 100-500 lines)
2001.12.25 (time) Start Time
Weather for 2001.12.25 (number)
Something here (Varies from (10-50 lines)
And I need to scan the "Start Time" and "Weather" lines for the "time" and "number".
Here is the code im using:
sscanf(starttime, "2001.12.25 %d Start Time",&stime);
sscanf(weather, "Weather for 2001.12.25 %d",&wthr);
If my document only contains the 2 lines it scans them. But if contains other lines before and after it won't. Do any of you know a way to help?
Thanks, Will be waiting for responses.