i declare the i above but still
error C2065: 'i' : undeclared identifier
im using vs 2013
void CDeathMatch::RemoveViewer( CUser* pUser )
{
if( IsValidObj( pUser ) )
{
if( FindPlayer( pUser->m_idPlayer ) == 0 )
{
BOOL bFound = FALSE;
for( size_t i = 0; i < m_vecDeathMatchViewer.size(); i++ )
{
if( m_vecDeathMatchViewer[i] == pUser->m_idPlayer )
{
bFound = TRUE;
break;
}
}
if( bFound )
m_vecDeathMatchViewer.erase( m_vecDeathMatchViewer.begin() + i );<---THIS LINE
}
}
}