title: Why am I getting no matching function for call to
body: <p>I am getting these errors:</p>
  <pre>
  no matching function for call to 'Date::Date()'
  Appointment(){
  </pre>
  <p>and</p>
  <pre>
  no matching function for call to 'Time::Time()'
  Appointment(){
  </pre>
  <p>Appointment.h</p>
  <pre class="lang-cpp prettyprint-override"><code>// Appointment.h -- Class Appointment   UPDATE as needed
  //
  using namespace std;#include &quot;Time.h&quot;
  
  #include &quot;Date.h&quot;
  
  #ifndef APPOINTMENT_H
  #define APPOINTMENT_H
  
  class Appointment: public Date, public Time {
      private: int howLong;
      public: Appointment() {
          month;
          day;
          year;
          hour;
          minute;
          howLong;
  
      }
  
      virtual void print() {
          cout &lt;&lt; howLong &lt;&lt; &quot; &quot;;
      }
  
  };
  
  #endif
  </code></pre>
  <p>Time.h</p>
  <pre class="lang-cpp prettyprint-override"><code>//Time.h -- Class Time UPDATE  as needed
  using namespace std;#include&lt;iostream&gt;
  
  #ifndef TIME_H
  #define TIME_H
  
  class Time {
      private:
          int hour;
      int minute;
      public:
          Time(int, int) {
              hour;
              minute;
          }
      virtual void print() {
          cout &lt;&lt; hour &lt;&lt; &quot; &quot; &lt;&lt; minute &lt;&lt; &quot; &quot;;
      }
  
  };
  #endif    
  </code></pre>
  <p>Date.h</p>
  <pre class="lang-cpp prettyprint-override"><code>// Date.h -- Class Date    UPDATE  as needed
  
  #ifndef DATE_H
  #define DATE_H
  
  class Date {
      private:
          int month;
      int day;
      int year;
      public:
          Date(int, int, int) {
              month;
              day;
              year;
          }
      friend bool friendTorCompare2Dates(const Date &amp; ,
          const Date &amp; );
  
  };
  
  bool friendTorCompare2Dates(const Date &amp; Right,
      const Date &amp; Left) {
      if (Right.month == Left.month &amp;&amp; Right.day == Left.day)
          return true;
      else
          return false;
  }
  
  #endif    
  </code></pre>
  <p>Here is the main program:</p>
  <pre><code>/*
   * Homework 4  -- UPDATE as needed
   */
  
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;iomanip&gt;
  #include &lt;string&gt;
  
  #include &quot;Appointment.h&quot;
  
  using namespace std;
  
  int main() {
      int month, day, year, hour, minute, howLong;
      void callPrint(Time &amp; TimeOrApptObject) {
          TimeOrApptObject.print();
      }
      Appointment myAppointments[19];
  
      ifstream HW4DataFileHandle;
  
      HW4DataFileHandle.open(&quot;Lab6Data.txt&quot;);
      while (!HW4DataFileHandle.eof()) {
          for (int i = 1; i &lt; 20; i++) {
              HW4DataFileHandle &gt;&gt; month;
              HW4DataFileHandle &gt;&gt; day;
              HW4DataFileHandle &gt;&gt; year;
              HW4DataFileHandle &gt;&gt; hour;
              HW4DataFileHandle &gt;&gt; minute;
              HW4DataFileHandle &gt;&gt; howLong;
              myAppointments[i] = Appointment(month, day, year, hour, minute, howLong );
          }
          cout &lt;&lt; &quot;enter a month&quot; &lt;&lt; endl;
          cin &gt;&gt; month;
          cout &lt;&lt; &quot;enter a day&quot; &lt;&lt; endl;
          cin &gt;&gt; day;
          cout &lt;&lt; &quot;enter a year&quot; &lt;&lt; endl;
          cin &gt;&gt; year;
          Date myDate(month, day, year);
  
          cout &lt;&lt; &quot;Appointments for&quot; &lt;&lt; month &lt;&lt; &quot;/&quot; &lt;&lt; day &lt;&lt; &quot;/&quot; &lt;&lt; year &lt;&lt; &quot;:&quot; &lt;&lt; endl;
  
          for (int i = 0; i &lt; 13; i++) {
              if (myAppointments[i] == Date myDate) {
                  Time thisTime = myAppointments[i];
                  thisDate.print();
                  cout &lt;&lt; endl;
              }
          }
  
      }
  }
  </code></pre>
  <p>I assumed that <code>Appointment.h</code> would inherit the public constructors from <code>Date</code> and <code>Time</code> and pass them on to its own constructor <code>Appointment()</code>.</p>
  <p>What do I need to change to make it work? Please include an example in your answer, it would be much appreciated. If you have any questions or noticed anything else, please let me know.</p>