Hi
I am migrating my application from vc++6.0 to vc++2008, iam facing this undeclaration error:
before when i was migarting to vc++2013, i was told to use auto key:
for (auto it = m_periods.begin(); it != m_periods.end(); it++)
the error was gone when following this step in vc++2013 but not in vc++2008
below is the list of code:
if (CBalancingPeriod::Includes(m_iAccountingPeriodNo, dCurrent, dReference))
{
// Search the reference from the list
for (it = m_periods.begin(); it != m_periods.end(); it++)
{
CBalancingPeriod &p = *it;
if (CBalancingPeriod::Includes(m_iAccountingPeriodNo, p.m_dAccountPeriodStart, dReference))
{
return (&p);
}
}
}
========================================================
When using in 2008 the auto keyword, iam getting 2 new errors: " error C2440: 'initializing' : cannot convert from 'std::_List_iterator<std::_List_val<std::_List_simple_types<CBalancingPeriod>>>' to 'int' "
and " error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'int' (or there is no acceptable conversion) "
Can anyone telll me the step i need to take to remove this error from vc++2008
Thanks