This should just be m_programmeItems[i]->GetEPGInfoTag();  You don't need the temporary.  If you do use a temporary, at least make it const (you shouldn't need the cast?)