title: C++ circular include
body: <p>I can't solve this circular dependency problem; always getting this error:
  "invalid use of incomplete type struct GemsGame"
  I don't know why the compiler doesn't know the declaration of GemsGame even if I included gemsgame.h
  Both classes depend on each other (GemsGame store a vector of GemElements, and GemElements need to access this same vector)</p>
  
  <p>Here is partial code of GEMELEMENT.H:</p>
  
  <pre><code>#ifndef GEMELEMENT_H_INCLUDED
  #define GEMELEMENT_H_INCLUDED
  
  #include "GemsGame.h"
  
  class GemsGame;
  
  class GemElement {
      private:
          GemsGame* _gemsGame;
  
      public:
          GemElement{
              _gemsGame = application.getCurrentGame();
              _gemsGame-&gt;getGemsVector();
          }
  };
  
  
  #endif // GEMELEMENT_H_INCLUDED
  </code></pre>
  
  <p>...and of GEMSGAME.H:</p>
  
  <pre><code>#ifndef GEMSGAME_H_INCLUDED
  #define GEMSGAME_H_INCLUDED
  
  #include "GemElement.h"
  
  class GemsGame {
      private:
          vector&lt; vector&lt;GemElement*&gt; &gt; _gemsVector;
  
      public:
          GemsGame() {
              ...
          }
  
          vector&lt; vector&lt;GemElement*&gt; &gt; getGemsVector() {
              return _gemsVector;
          }
  }
  
  #endif // GEMSGAME_H_INCLUDED
  </code></pre>