Курсовая работа: Односвязный список на основе указателей
}
if (pTemp == NULL) {
cout<<"No match found";
return;
}
else {
pPrev->pNext = pTemp->pNext;
if (pTemp == pTail) {
delete pTemp;
SetTail(pHead);
cout<<"New tail of list assigned\n";
return;
}
delete pTemp;
cout<<"Entry removed successfully\n";
}
}
void List::Remove_(char *Query) {
int choice;
cout<<"(1) Remove only one entry with specified name\n";
cout<<"(2) Remove all entries with specified name: "; cin>>choice;
if (choice != 2) {
Remove(Query);
return;
}
while (Search(Query) == 1) {
Remove(Query);
}
}