title: errors in program ClockType.h, testClockType.cpp, and ClockTypeImp.cpp
body: <p>Still have 7 errors:</p>
  <ol>
  <li><p>clockTypeImp.cpp:48: error: prototype for ‘void ClockType::getTime(int&amp;, int&amp;, int&amp;) const’ does not match any in class ‘ClockType’</p>
  </li>
  <li><p>clockType.h:35: error: candidate is: void ClockType::getTime(int&amp;, int&amp;, int&amp;)</p>
  </li>
  <li><p>clockTypeImp.cpp:98: error: expected constructor, destructor, or type conversion before ‘(’ token</p>
  </li>
  <li><p>clockTypeImp.cpp:109: error: ISO C++ forbids declaration of ‘clockType’ with no type</p>
  </li>
  <li><p>clockTypeImp.cpp:109: error: no ‘int ClockType::clockType()’ member function declared in class ‘ClockType’</p>
  </li>
  <li><p>clockTypeImp.cpp:118: error: ISO C++ forbids declaration of ‘clockType’ with no type</p>
  </li>
  <li><p>clockTypeImp.cpp:118: error: no ‘int ClockType::clockType(int, int, int)’ member function declared in class ‘ClockType’</p>
  </li>
  </ol>
  <p>testClockType.cpp</p>
  <h1>include </h1>
  <h1>include &quot;clockType.h&quot;</h1>
  <p>using namespace std;</p>
  <pre><code>int main() 
  {
      
      int cellHours;
      int cellMinutes;
      int cellSeconds;
      int computerHours;
      int computerMinutes;
      int computerSeconds;
      
      cout &lt;&lt; &quot;Please tell me the hour on your cell phone: &quot;;
      cin &gt;&gt; cellHours;
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;Please tell me the minute on your cell phone: &quot;;
      cin &gt;&gt; cellMinutes;
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;Please tell me the second on your cell phone: &quot;;
      cin &gt;&gt; cellSeconds;
      cout &lt;&lt; endl;
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;Please tell me the hour on your computer: &quot;;
      cin &gt;&gt; computerHours;
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;Please tell me the minute on your computer: &quot;;
      cin &gt;&gt; computerMinutes;
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;Please tell me the second on your computer: &quot;;
      cin &gt;&gt; computerSeconds;
      cout &lt;&lt; endl;
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;=================================================&quot; &lt;&lt; endl;
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;Your cell phone time is: &quot; &lt;&lt; endl; 
      ClockType cellPhoneClock; 
      cellPhoneClock.setTime(cellHours, cellMinutes, cellSeconds); 
      cellPhoneClock.printTime();
      cout &lt;&lt; endl;
      cout &lt;&lt; &quot;Your computer time is: &quot; &lt;&lt; endl; 
      ClockType myComputerClock;
      myComputerClock.setTime(computerHours, computerMinutes, computerSeconds);
      myComputerClock.printTime();
      cout &lt;&lt; endl;
      
      if(!cellPhoneClock.equalTime(myComputerClock))
      {
         cout &lt;&lt; &quot;Both clocks do not have equal times&quot; &lt;&lt; endl;
         cout &lt;&lt; &quot;Setting myComputerClock to the cellPhoneClock time&quot; &lt;&lt; endl;
         int hours, minutes, seconds;
         cellPhoneClock.getTime(hours, minutes, seconds);
         myComputerClock.getTime(hours, minutes, seconds);
     }
     else
     {
         cout &lt;&lt; &quot;Both clocks have equal times&quot; &lt;&lt; endl;
     }
     cout &lt;&lt; endl &lt;&lt; &quot;Final cell phone time is: &quot;;
     cellPhoneClock.printTime();
     cout &lt;&lt; endl &lt;&lt; &quot;Final computer time is: &quot;;
     cellPhoneClock.printTime();
     cout &lt;&lt; endl;
  return 0;
  }
  </code></pre>
  <p>clockTypeImp.cpp</p>
  <pre><code>#include &lt;iostream&gt;
  #include &quot;clockType.h&quot;
  
  class ClockType; 
  
  void ClockType::setTime (int hours, int minutes, int seconds)
  {
      if ( 0 &lt;= hours &amp;&amp; hours &lt; 24 )
          hr = hours; //added int to initialize
      else
          hr = 0;
      
      if ( 0 &lt;= minutes &amp;&amp; minutes &lt; 60 )
          min = minutes; //added int to initialize
      else
          min = 0;
      
      if ( 0 &lt;= seconds &amp;&amp; seconds &lt; 60 )
          sec = seconds; //added int to initialize
      else
          sec = 0;
  }
  
  void ClockType::getTime (int&amp; hours, int&amp; minutes, int&amp; seconds) const
  //error: prototype for ‘void ClockType::getTime(int&amp;, int&amp;, int&amp;) const’ does not match any in class ‘ClockType’
  {
      hours = hr;
      minutes = min;
      seconds = sec;
  }
  
  void ClockType::printTime() const
  {
      if (hr &lt; 10)
          cout &lt;&lt; &quot;0&quot;;
      cout &lt;&lt; hr &lt;&lt; &quot;:&quot;;
      
      if (min &lt; 10)
          cout &lt;&lt; &quot;0&quot;;
      cout &lt;&lt; min &lt;&lt; &quot;:&quot;;
      
      if (sec &lt; 10)
          cout &lt;&lt; &quot;0&quot;;
      cout &lt;&lt; sec &lt;&lt; &quot;:&quot;;
  }
  
  void ClockType::incrementHours()
  {
      hr++;
      if (hr &gt; 23)
          hr = 0;
  }
  
  void ClockType::incrementMinutes()
  {
      min++;
      if (min &gt; 59)
      {
          min = 0;
          incrementHours(); //increment hours
      }
  }
  
  void ClockType::incrementSeconds()
  {
      sec++;
      if (sec &gt; 59)
      {
          sec = 0;
          incrementMinutes(); //increment minutes
      }
  }
  
  ClockType::equalTime (clockType&amp; myComputerClock) const
  //clockTypeImp.cpp:98: error: expected constructor, destructor, or type conversion before ‘(’ token
  {
      return (hr == myComputerClock.hr
              &amp;&amp; min == myComputerClock.min
              &amp;&amp; sec == myComputerClock.sec);
  }
  
  ClockType::clockType()
  //error: ISO C++ forbids declaration of ‘clockType’ with no type
  //error: no ‘int ClockType::clockType()’ member function declared in class ‘ClockType'
  {
      hr = 0;
      min = 0;
      sec = 0;
  }
  
  ClockType::clockType(int hours, int minutes, int seconds)
  //error: ISO C++ forbids declaration of ‘clockType’ with no type
  //error: no ‘int ClockType::clockType(int, int, int)’ member function declared in class ‘ClockType’
  {
      setTime(hours, minutes, seconds);
  }
  </code></pre>
  <p>clockType.h</p>
  <pre><code>#ifndef CLOCKTYPE_H
  #define CLOCKTYPE_H
  
  using namespace std;
  
  class ClockType
  {
      public:
          void setTime (int hours, int minutes, int seconds);
          void getTime (int&amp; hours, int&amp; minutes, int&amp; seconds); //error: candidate is: void ClockType::getTime(int&amp;, int&amp;, int&amp;)
          void printTime() const;
          void incrementSeconds();
          void incrementMinutes();
          void incrementHours();
          bool equalTime(ClockType&amp; otherClock) const; 
          ClockType(int hours, int minutes, int seconds);
          ClockType();
          
      private:
          int hr;
          int min;
          int sec;
  };
  #endif 
  </code></pre>