关于bool List::ListDelete(int i, int* e)
bool List::ListDelete(int i, int* e)
{
*e = m_pList[i];
for (int k = i + 1; k < m_iLength; k++)
{
m_pList[k - 1] = m_pList[k]; 这里可以写成m_pList[i]=m_pList[i+1]吗
}
m_iLength--;
return true;
}
bool List::ListDelete(int i, int* e)
{
*e = m_pList[i];
for (int k = i + 1; k < m_iLength; k++)
{
m_pList[k - 1] = m_pList[k]; 这里可以写成m_pList[i]=m_pList[i+1]吗
}
m_iLength--;
return true;
}
2020-11-29
举报