#ifndef ABILITY_H
#define ABILITY_H
#include <iostream>
#include "Entity.h"
usingnamespace std;
class Ability
{
public:
Ability();
int level;
string name;
int manacost;
int healthcost;
int damage;
int offdamage;
int heal;
int offheal;
int armordamage;
void setStats(string n, int l, int mc, int hc, int d, int h, int ad);
};
#ifndef ENTITY_H
#define ENTITY_H
#include <iostream>
#include "Entity.h"
#include "Spell.h"
#include "Item.h"
#include "Ability.h"
usingnamespace std;
class Entity
{
public:
Entity();
int health=1;
int mana=1;
int level=1;
string name="Default";
int damage=1;
int armor=1;
int spellpower=1;
int healthregen=1;
int manaregen=1;
int crit=1;
Ability abilities[10];
};
#endif // ENTITY_H
I think I had this problem once. It's probably because you can't have two classes include each other. Entity can't include Ability while Ability includes Entity.
@daverave1212 If you need to use Entity in Ability and vice versa, then you should re-think your design, because it's not too good. I'm pretty sure you can implement another way of doing this the exact same thing.