Can anyone explain how this C++ delete function work?
the complete code is from here:
https://www.chegg.com/homework-help/questions-and-answers/need-help-coding-c-please-write-program-implements-database-system-program-use-array-type–q29248205
public:int searchContact(string ph)
{
int i;
//search the contact_list from starting to currentsixe
for (i = 0; i < size; i++)
{
//if required contact fount exitfrom loop
if (ph ==contact_list[i].getPhoneNumber())
break;
}
//If contact not found display that message touser
if (i == size)
{
cout << “nCouldnt find anycontact details with phone number:” << ph <<endl;
return -1;
}
else//if found display cntact details
{
cout << “nContactFoundn”;
cout <<contact_list[i];
return i;
}
}
//method to delete contact
PayPal Gateway not configured
PayPal Gateway not configured