After:

int inputHour()
{
   // Variable declarations
   int hour;

   // Read the hour
   do
   {
      cout << "Please enter the hour (0-23)" << endl;
      cin >> hour;
   } while( !( hour >= 0 && hour <= 23 ) );

   // Return hour
   return hour;
}