Hi, I've been searching all over trying to find an answer to my problem about reading/writing text files. I saw this very old post/code snippet and am wondering if you could help me with my own:

How about if I have this input file:

39882 M 7:45 18:16 10 hours 31 mins 900.00
39882 T 8:00 17:45 9 hours 45 mins 800.00
39882 W 7:56 17:30 9 hours 34 mins 800.00
39882 T 8:02 18:01 9 hours 59 mins 800.00
39882 F 7:57 18:05 10 hours 8 mins 900.00
39882 S 8:15 17:35 9 hours 20 mins 800.00
39882 S 8:00 17:30 9 hours 30 mins 800.00

And I want to read it and write to another text file like so:

39882 68 hours 47 mins 5800.00

It sums up the hours (int), mins (int), and the amount (float).
How do I go about reading and writing it so I get only one 39822 (char id)?

Thanks so much in advance!

Are you facing trouble in reading from file or you cant build solution to your problem?
Vinayak