So this is confusing me a little. Neither will be declared before the other, incomplete types or such. Game
won't go before Hero
because of Hero test1
. Hero
won't go before Game
because of friend void Game::vitals(Hero&);
Is this an impossible circular dependency?
class Game
{
// ...
void vitals(Hero&);
Hero test1;
};
class Hero : public Character
{
// ...
public:
friend void Game::vitals(Hero&);
};