I'm new to C++, been through the basics, and now I'm attempting to make a small console rpg-game where I want my stats (level, xp and such) to be saved in a file. I've successfully saved them into a txt-file, but how do I open it? I don't need to know how to type it onto the screen, but to put the data into variables. How?
EDIT: I want to load the stats in the beginning of the program so that they are there when you start it (saved from the last time).
I've tried that, unfortunately it doesn't help me :(
Could you give me the code for loading the data from "test.txt" into the program, loading into the variables "str", "spd", and "acc". Sorry if my english isn't the best.