title: Call function from object instantiated in one class in another
body: <p>I have two classes, both of which need to be able to call the same instance of entitymanager</p>
  
  <pre><code>class Engine
  {
    EntityManager::Entitymanager EManager;
  }
  </code></pre>
  
  <p>And I need to add an object to a vector contained by this particular instance of Engine. What I want to do is be able to add a bullet spawned by the player to the vector that contains all my entities. </p>
  
  <pre><code>class Player : Entity
  {
    void SpawnBullet() {Engine::EManager.Add(BULLET);}
  }
  </code></pre>
  
  <p>The above returns this error:</p>
  
  <p>error: object missing in reference to ‘Engine::EManager’</p>
  
  <p>How do I resolve this? Any help or pointers in the right direction would be much appreciated!</p>