ok I'm trying to save all of these variables:
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int trainingHut(void);
int forest(void);
void menuFunc(void);
int weaponShop(void);
int forbidenPalece(void);
int field(void);
int rest(void);
int beach(void);
int armorShop(void);
int attackPhase(void);
int deffensePhase(void);
int itemfind(void);
int attackAsk(void);
//inventory
string currentWeapon;
string currentAcessory;
string currentArmor;
string currentShield;
string currentFootwear;
string usedWeapons[200];
int index = 0;
//stats
int hp = 50;
int xp = 0;
int atk = 17;
int lvl = 1;
int def = 14;
int armdef = 0;
int wepatk = 0;
int mana = 15;
int acc = 11;
int eva = 9;
int spllvl = 1;
int totAtk = atk + wepatk;
int totDef = def + armdef;
//monster stuff
string monster;
int monsterHp;
int monsterAtk;
int monsterDef;
int monsterAcc;
int monsterEva;
int damage;
int monsterDamage;
int temporaryAtk = totAtk;
int temporaryDef = totDef;
//all weapons
string maces = "maces";
string clubs = "clubs";
string swords ="swords";
string scimitars = "scimitars";
string axes = "axe";
string daggers = "daggers";
//all defenses
string shield;
string armor;
string helmet;
//all other
string rings;
string footwear;
string gloves;
string necklaces;
string cape;
//all words
string yes;
string Hi;
int menu;
int gold = 500;
//maces
string spikedmaces = "spicked";
string bronzemaces = "bronze";
string ironmaces = "iron";
string silvermaces = "silver";
string icemaces = "ice";
string firemaces = "fire";
string goldmaces = "gold";
string dimondmaces = "dimond";
//armor
string spikedarmor = "spicked";
string bronzearmor = "bronze";
string ironarmor = "iron";
string silverarmor = "silver";
string icearmor = "ice";
string firearmor = "fire";
string goldarmor = "gold";
string dimondarmor = "dimond";
:to a file during the program and then when i start up my program again i want it to cheak and see if the variables are saved to a file like "saveOne" and if so i want the variables that were saved there replace the new ones if not, continue regularly
i saw the tutorial but it just told me how to make it write something not write a variable and then load it again