MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116
Read the whole line with fgets()
Tokenise is with strchr(), strtok() or anything else you can think of.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
You call fgets() twice, then close the file INSIDE the loop.
So yeah, you only go round the once.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953