... just as Thomas Magle Brodersen found in some production code.

int CEDitLocation::FetchLocationInfo(int index)
{
  for(int ix=0; ix < m_RegArray.GetSize(); ix++){
    if (ix==index)
    {
      m_location=m_RegArray[ix].m_LocationName;
      m_display_type=m_RegArray[ix].m_DisplayType ;
      m_address=m_RegArray[ix].m_IpAddress ;

      UpdateData(false);
      break;
    }
  }
...

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!