This is my first post. I'm trying to write a simple program to open a .txt file which would contain an aviation forecast and decode it into simple english that anyone could understand.
I've found code on how to open the text file and display it in the console, but I'm stumped on how to pick individual components in the text and then convert it to my new output.
What would I use to read the text and how would I implement my changes? Just a few hints would nice as I like the challenge and I'll learn much more than being totally spoonfed. Thanks.
You'll have to create a new file with the translation. This is because the writing functions available simply run over any pre-existing data. So changing "CAVOK" to "Ceiling and visibility ok" would actually probably cause this:
TAF YBCV 270020Z 2702/2714
23007KT Ceiling and visibility okT Ceiling and visibility ok Q 1019 1017 1018 1020
So, instead, create a new file with the translation.
Simply read the file word for word checking against the database
1 2 3
originalFile >> str;
if(str=="CAVOK")
translation << "Ceiling and visibility ok"