Well, here is my favourites (found in my current bug-fixing project) 1) if (bVar1==FALSE) { bVar2=TRUE; } else { bVar2=FALSE; } 2) CChangesCacheListChangeStateElement * pElement=new CChangesCacheListChangeStateElement(); 3) aaand the greatest ! strPreparingString = CString("Datetime:") + tmTime.Format("%m/%d/%Y") + CString(" ") + tmTime.Format("%H:%M") + CString(" "); CString t_strTempTypeValue, t_strTypeValue; t_strTempTypeValue.Format("%x", btType); if(btType < 15) t_strTypeValue += "0"; t_strTempTypeValue.MakeUpper(); t_strTypeValue += t_strTempTypeValue; strPreparingString += CString("Type:0x") + t_strTypeValue; CString t_strTempUnitIDValue, t_strUnitIDValue; t_strTempUnitIDValue.Format("%x", wdUnitID); try { if(wdUnitID & 0xF000) throw 1; else t_strUnitIDValue += "0"; if(wdUnitID & 0x0F00) throw 1; else t_strUnitIDValue += "0"; if(wdUnitID & 0x00F0) throw 1; else t_strUnitIDValue += "0"; // if(wdUnitID & 0x000F) throw 1; else t_strUnitIDValue += "0"; } catch(...){ } t_strTempUnitIDValue.MakeUpper(); t_strUnitIDValue += t_strTempUnitIDValue; strPreparingString += CString(" Item:0x") + t_strUnitIDValue; strPreparingString += CString(" UnitName:") + strUnitName; ;P ;P ;P
S
sahn0
@sahn0