title: How to include class which uses base class
body: <p>The question is hard to ask but I'll try to explain:
  I have a class World that import Class Species, and holds list of Species.
  I need to have pointer to class World in class Species, but if I import Class World before declaring Species errors occurs.</p>
  <p>Example in pseudo code:</p>
  <pre><code>import B
  Class A
  {
  list of B
  }
  </code></pre>
  <pre><code>Class B
  {
  Class A* a
  }
  </code></pre>
  <p>so I need to import class A to make pointer to it, but when I do Class B is not declared in clas A.</p>
  <p>my code:</p>
  <pre><code>
      
  #pragma once
  #include &lt;iostream&gt;
  
  class Species
  {
  
  protected:
      std::string speciesName;
      int strengh;
      int effort;
      int posX;
      int posY;
      int specieSymbol;
  
  public:
      Species();
      Species(std::string speciesName, int strengh, int effort, int posX, int posY);
  
      int getPosX();
      int getPosY();
  
      void setPosX(int x);
      void setPosY(int y);
  
      int getSpeciesSymbol();
  
      std::string getSpeciesName();
  
      virtual void action() = 0;
      virtual void colision() = 0;
  
      //void setWorld(World* w);
      //World* getWorld();
  
      ~Species();
  };
  
  </code></pre>
  <pre><code>#pragma once
  #include &lt;iostream&gt;
  #include &quot;Species.h&quot;
  #include &lt;list&gt;
  #include &quot;Board.h&quot;
  class World
  {
  private:
      std::list &lt;Species*&gt; species;
      Board* board;
  
  public:
      World(Board *board);
  
      void addSpecies(Species* s);
      
      void printSpecies();
  
      void printWorld();
  
      void Update();
      
      ~World();
  };
  
  </code></pre>