0

HI
just starting learning c++ and i think it is a good choice what youn think ?
my question why are we using vectors of objects..we can store infos inside a vector and the we can display them the problem if i quit the program everything is gone..work on memory
any help for this issue
thanks

2
Contributors
2
Replies
8
Views
4 Years
Discussion Span
Last Post by asaidi
0

If you want to retain what was held in the vector then before you exit your program you must write that information to a file. Then you also have to change your code so that when the program loads it loads the file into memory. Files are the only way I know of to make data persistent between launches of a program.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.