title: Declaration is incompatible with
body: <p>I have an issue compiling and running the code on visual studios. It gives me the error code "declaration is incompatible with" so and so. More specifically, when calling on the header in the code in the beginning of each function from the main CPP. I've tried changing the void to int in the header, but it didn't seem to fix it. I'm stuck now and need some guidance. </p>
  
  <p>The error is:
  "Severity   Code    Description Project File    Line    Suppression State
  Error (active)  E0147   declaration is incompatible with "void convertTime::invalidHr(int hour)" (declared at line 9 of "Time.h")   Source.cpp  6   "</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Time.h"
  
  using namespace std;
  
  int convertTime::invalidHr(int hour) *//error on this line*
  {
  int convertHour = hour;
  
  try 
  {
      if (hour &lt; 13 &amp;&amp; hour &gt; 0)
      {
          hour = hour + 12;
          return hour;
      }
      else {
          cin.clear();
          cin.ignore();
          cout &lt;&lt; "Invalid input! Please input hour again in correct 12 hour format: ";
          cin &gt;&gt; hour;
          invalidHr(hour);
          throw 10;
      }
  }
  catch (int c) { cout &lt;&lt; "Invalid hour input"; }
  }
  
  int convertTime::invalidMin(int min) *//error here*
  {
  int convertMin = min;
  
  try 
  {
      if (min &lt; 60 &amp;&amp; min &gt; 0)
      {
          return min;
      }
      else {
          cin.clear();
          cin.ignore();
          cout &lt;&lt; "Invalid input! Please input minutes again in correct 12 hour format: ";
          cin &gt;&gt; min;
          invalidMin(min);
          throw 20;
          return 0;
      }
  }
  catch (int e) { cout &lt;&lt; "Invalid minute input" &lt;&lt; endl; }
   }
  
  int convertTime::invalidSec(int sec) *//error here*
  {
  int convertSec = sec;
  
  try 
  {
      if (sec &lt; 60 &amp;&amp; sec &gt; 0)
      {
          return sec;
      }
      else {
          cin.clear();
          cin.ignore();
          cout &lt;&lt; "Invalid input! Please input seconds again in correct 12 hour format: ";
          cin &gt;&gt; sec;
          invalidSec(sec);
          throw 30;
          return 0;
      }
  }
  catch (int t) { cout &lt;&lt; "Invalid second input" &lt;&lt; endl; }
  }
  
  void convertTime::printMilTime()
  {
  cout &lt;&lt; "Converted time: " &lt;&lt; hour &lt;&lt; ":" &lt;&lt; min &lt;&lt; ":" &lt;&lt; sec;
  }
  </code></pre>
  
  <p>And here is my header:</p>
  
  <pre><code>class convertTime
  {
   public:
  int hour, min, sec;
  
  void invalidHr(int hour);
  void invalidMin(int min);
  void invalidSec(int sec);
  void printMilTime();
  }; 
  </code></pre>