Pages

2010-04-09

'wake up' humour at 02:28:31

int
ShiftManagement::NoofShifts (void)
{
  int i = 0;
  std::list ::iterator itershift;
  for (itershift = m_ShiftDetails.begin (); itershift != m_ShiftDetails.end ();
       itershift++)
    {
      i++;
    }
  return i;
}

Shyte.. Should I laugh or cry?

Update :
Oh wait, looks like we got more here..
      if (mins >= 0 && mins <= 9)
        snprintf(tmpStr,10,"%d:0%d",hrs,mins);
      else
        snprintf (tmpStr, 10,"%d:%d",hrs,mins);

3 comments:

Balachandran said...

Wonderful!! Appreciate the "creativity" Joe ;) They are testing the size() operation :)

Joe Steeve said...

@bala: right!!

L.Guruprasad said...

Some code in TCENet is even funnier. ;)