elseif (response1 == "tomahawk" && tomahawk.amount > 0)
{
if (monster.fight)
{
cout << "1";
}
else
{
cout << "\nYou cannot use this when not in a fight!\n\n\n";
}
}
monster.fight is set to 0 from another part of my code.
class monster{
public:
int health, fight;
} monster;
Int my void initialization is specefied that monster.fight = 0 and this initialize runs in the beginning of the code. There is nowhere in the code where monster.fight is being set to 1 at all, it just happens.
Are you sure your testing the right executable? I've made this mistake before: copying an executable from the wrong path to a test environment and couldn't figure out why I didn't see my latest changes. Did you try a clean build?