Hi!
I get this error. And im pretty sure it has to do with some include order or circular include.
Error 1 error C2079: 'cRegion::a' uses undefined class 'army' This is from the world.h file that starts like this:
#pragma once
#include "unit.h"
#include "main.h"
#include "cWalker.h"
#include "pathMaster.h"
#include "player.h"
class army;
class armyUnit;
class unit;
class cRegion{
public:
polygon2D shape;
army a;
}; The class "army" is defined in unit.h which starts like this:
#pragma once
#include "main.h"
#include "world.h"
#include "cWalker.h"
#include "pathUnit.h" So yes they both include each other. But how can I not do that? They both need to know how each other look since they use the members of each other (the classes "army" and "cRegion")