| |

VerySource

 Forgot password?
 Register
Search
View: 666|Reply: 1

.Dat data file read and write operations (urgent !!!)

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-14 12:40:01
| Show all posts |Read mode
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,
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-5 16:45:01
| Show all posts
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
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list