I need to store a small amount of data (between 1 and 5 characters) and I would like to know the best way to go about doing it.
I need to be able to read it when the application first starts and if the file doesn’t exist, create it and save data to it (or if it does exist, read the data and put it in a variable).
Any guidance and code examples given on any of these problems will be greatly appreciated.
You’ll need to write and read your data from a file. If you want to find out how to read and write files in C++ you can try the following tutorial:
http://www.cplusplus.com/doc/tutorial/files/