I am creating a 2d tile map game currently and I am trying to find a moderate way of saving and loading it through a text file and fstream.h. I am doing the saving by integers as well. What is difficult for me to understand is how integers save and load. Per line perhaps? I am just not sure about this.
Thank you
As long as you can tell where an integer begins and ends it doesn't matter. I recommend you write-up an example of what you'd like your file to look like and make your code read and write that.
How would I tell where an integer begins. I would not mind having an integer a line but I am using
My file>>integer; and i am not sure how it reads I.e. by line, separated by spaces, or some other way