title: How to access out-of-scope class?
body: <p>First of all, I would like to apologize if I used incorrect terminology in the question. I do not have any sort of formal training in programming. It was the best I could do to convey the problem.</p>
  
  <p>My question is this:</p>
  
  <p>In the following code structure, how can the Inventory class have complete access to Items vector inside the Player class WITHOUT making the vector static?</p>
  
  <p>-- main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  #include "World.hpp"
  #include "Interface.hpp"
  
  int main()
  {
      World objWorld;
      Interface objInterface;
      return 0;
  }
  </code></pre>
  
  <p>-- World.hpp</p>
  
  <pre><code>#pragma once
  #include "Player.hpp"
  
  class World
  {
  public:
      Player objPlayer;
  };
  </code></pre>
  
  <p>-- Player.hpp</p>
  
  <pre><code>#pragma once
  
  class Player
  {
  public:
      std::vector&lt;int&gt; Items;
  };
  </code></pre>
  
  <p>-- Interface.hpp</p>
  
  <pre><code>#pragma once
  #include "Inventory.hpp"
  
  class Interface
  {
  public:
      Inventory objInventory;
  };
  </code></pre>
  
  <p>-- Inventory.hpp</p>
  
  <pre><code>#pragma once
  
  class Inventory
  {
  public:
      // Needs to have complete access to Items, be able to see and modify the vector
  };
  </code></pre>