In the .Dat data, I save the game data, including runtime variables, etc.
I want to load this data after the game restarts, and continue to run,
How to read the value of the variable and then pass it to the variable,
See how you want to design the data structure of this .Dat file, there are many ways~~~
Very much~~~~
The easiest way is to use ifstream to write directly into it and add spaces between you. You should have an array that indicates what the number is~~~~~ Then use ofstream to read the number between two spaces each time