RSS Forums RSS
Please support our C++ advertiser: Programming Forums
Views: 3450 | Replies: 21
Reply
Join Date: Jul 2005
Posts: 244
Reputation: Drowzee is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Drowzee Drowzee is offline Offline
Posting Whiz in Training

Re: help!! how do you save a variable to a...

  #21  
Jul 22nd, 2005
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.
Reply With Quote  
Join Date: Jul 2005
Posts: 37
Reputation: jasondrey13 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
jasondrey13 jasondrey13 is offline Offline
Light Poster

Re: help!! how do you save a variable to a...

  #22  
Aug 4th, 2005
thx i got it
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:56 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC