Well, there's no way to just do something like
saveAllVariables()
loadAllVariables()
but you can just write them all out to a file one by one:
ofstream ofs;
ofs.open("out.txt", ios:

ut);
if(!ofs){
//error stuff goes here
}
ofs << var1 << ' ' << var2 << ' ' << var3 << etc, etc;
ofs.close();
and then to read it back in:
ifstream ifs("out.txt");
if(!ifs)
//error stuff
ifs >> var1 >> var2 >> var3 >> etc,etc;
Let me know if you need anything else.
-Rob