My project at the moment is set up something like this
game.cpp
#include "game.h"
#include "enemy.h"
class Game {
public:
...
...
std::vector<Enemy> enemies;
...
};
enemy.cpp
#include "game.h"
class Enemy {
public:
...
...
void turn(Game* game);
...
};
I obviously understand that in this case, this creates a circular dependency. The Game object needs a reference to Enemy to keep a list of enemies and the Enemy has a function for doing its turn that needs a reference to the Game object. I'm not really sure how to break up this circular dependency. I tried to make a header file with forward class declarations but I was getting hit with "invalid use of incomplete type" errors.