Please support our C++ advertiser: Programming Forums
Views: 3450 | Replies: 21
![]() |
•
•
Join Date: Jul 2005
Posts: 244
Reputation:
Rep Power: 4
Solved Threads: 4
The struct has to contain the values of the variables you are interested in. The file should be binary, which would likely make it unreadable to you. But if you load the file, you should be able to access the information from the struct as you saved it.
This is why I reccomend you use a more condensed version of storing information. Your program needs to know that a 'd' in the mace slot stands for 'diamond mace', but the save file doesn't. It just wastes space and time to write out 'diamond mace' in the file.
The two examples I gave should be able to work together to save, then load information. You just need to take out the return 0 from the saving example before you put the code together.
This is why I reccomend you use a more condensed version of storing information. Your program needs to know that a 'd' in the mace slot stands for 'diamond mace', but the save file doesn't. It just wastes space and time to write out 'diamond mace' in the file.
The two examples I gave should be able to work together to save, then load information. You just need to take out the return 0 from the saving example before you put the code together.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode