cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
fstream
fstream
Jun 6, 2018 at 9:39am UTC
nearc
(28)
Guys how to create a .txt file which would have 10 plane names in txt file and to each plane name assign categories. When a program would run it would let select which planes information it wants to see (there will be 10 planes) .
for example
plane 1:
leaves at: 10:20
arrives: 14:50
airport: someairport
Last edited on
Jun 6, 2018 at 9:50am UTC
Jun 6, 2018 at 9:59am UTC
keskiverto
(10402)
How to write to a file? Just like you write to
std::cout
.
See
http://www.cplusplus.com/doc/tutorial/files/
When a program would run it would select which planes information it wants to see
That is a separate task. With the amount of data that you have it is better to have it all in memory when the program runs.
Perhaps you should have a
struct
to hold data of one plane. Then you could have a
vector
of those structs to keep and access info of all planes.
Once you know what and how to read data, you have answer on how to write it.
Topic archived. No new replies allowed.