Jul 4, 2014 at 10:26pm UTC
battlesequence.h needs quotes:
#include "battlesequence.h"
Also:
in battlesequence.h I have "int health = 100"
That seems like trouble, can you post battlesequence.h?
Last edited on Jul 4, 2014 at 10:27pm UTC
Jul 4, 2014 at 10:35pm UTC
Sorry, that was a typo. It does have quotes. Here's battlesequence.h
#ifndef TESTINGPROGRAM_TESTINGPROGRAM_BATTLESEQUENCE_H_
#define TESTINGPROGRAM_TESTINGPROGRAM_BATTLESEQUENCE_H_
#include <iostream>
const int swordDmg = 10;
const int spellDmg = 15;
const int potion = 20;
void Battle();
void FightorFlee();
void FleeMessage();
int health = 0;
#endif //TESTINGPROGRAM_TESTINGPROGRAM_BATTLESEQUENCE_H_
Jul 4, 2014 at 10:59pm UTC
What is my best option for using something like a health variable that I'll need to use in for instance:
character stats
battle sequence
whatever else
Without using a global variable.
Should I use a class?