Before:

int inputHour( int hour )
{
   do
   {
      cout << "Enter the hour (1-12)" << endl;
      cin >> hour;
   } while( !(hour >= 1 && hour <= 12) );

   return hour;
}