save variable values between runs? read/write text file?

if i want to save the values of certain variables between runs of a program, what is the best way to do it?
write them to a text file and then load the text file?

and what’s the best way to do that? maybe i missed it but couldn’t seem to find any examples of this.

thanks,
dan

i just found the XML example and am assuming this is the way to go…
http://wiki.openframeworks.cc/index.php?title=Using-XML

yes, using ofxXmlSettings is the easiest way…