I am working in C on a text file that contains METAR data.
I would like to count how many entries file contains and still I don't know where to start and how to go through.
Counting lines is out of option, as METAR files may contain some additional 'commented' header data, so my first thought was to count all "METAR"s as in every entry there is just one. And still there is a problem of this commented header - who knows if someone didn't put some "METAR" in there?
i had to pay 20. Only because my PS4 wouldn't transfer it to PS5. Then it would get to 24% when using the disc and fail. So, I bought the online version only.
Microsoft Edge comes pre-installed with Windows 11 and it's a great browser, so why not use it? Not everyone is trying to run away from Google, sometimes people just want convenience and less friction.
No. The file manager is a lost cause. After all, its dev receives all the undeserved praise he could evre wish from Neowin, without having actually earned it. This has never lead to improvements.
Question
Action Hank
I am working in C on a text file that contains METAR data.
I would like to count how many entries file contains and still I don't know where to start and how to go through.
Counting lines is out of option, as METAR files may contain some additional 'commented' header data, so my first thought was to count all "METAR"s as in every entry there is just one. And still there is a problem of this commented header - who knows if someone didn't put some "METAR" in there?
Still, I do not know how, C is a new area for me.
There is a link to METAR on wikipedia: METAR
and some of my sample file:
And as you can see there might be some problems
Maybe counting "=" is a bright idea?
Do you have any ideas?
Any help is appreciated.
Link to comment
https://www.neowin.net/forum/topic/860548-c-file-operations-word-search-etc/Share on other sites
10 answers to this question
Recommended Posts