title: How to include a self-created class in another self-created class's header file?
body: <p>Say I have created two classes: Tires, and Car. </p>
  
  <p>So I have four files: Tires.cpp, Tires.h, Car.cpp, Car.h.</p>
  
  <p>The Car constructor takes Tires as its parameter. But I am not sure how to modify Car.h to 
  include Tires.h.</p>
  
  <p>Here's what I've done so far (note: they are in separate files)</p>
  
  <p>Tires.h</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class Tires
  {
  private:
      int numTires;
  
  public:
      Tires();
  };
  </code></pre>
  
  <p>Tires.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Tires.h"
  using namespace std;
  
  Tires::Tires()
  {
      numTires = 4;
  }
  </code></pre>
  
  <p>Car.h</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Tires.h" 
  using namespace std;
  
  class Tires; // Tried taking out forward declaration but still didn't work
  
  class Car
  {
  private:
      Tires tires;
  
  public:
      Car(Tires);   // Edited. Thanks to Noah for pointing out.
  
  };
  </code></pre>
  
  <p>Car.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Car.h"
  #include "Tires.h"
  using namespace std;
  
  Car::Car(Tires _tires)
  {
      tires = _tires;
  }
  </code></pre>
  
  <p>Thanks</p>